- Removed conditional check for production environment in
the initializer to ensure the sitemap refresh worker
always runs at startup.
- Renamed Sidekiq configuration file from sidekiq.yml to
sidekiq_scheduler.yml to better reflect its purpose.
These changes streamline the initialization process
for scheduled tasks and enhance the clarity of the
configuration files used in the project.
- Add error handling when scheduling the RefreshSitemapWorker in
production.
- Log successful scheduling and errors for improved diagnostics.
This change ensures that any issues with scheduling the worker are
logged and can be addressed promptly, enhancing the reliability of
the application in production.
- Update the condition to check for 'RAILS_BUILD' environment variable
- Allow RefreshSitemapWorker to run in development/test environments
This change clarifies the logic for executing the sitemap refresh worker by
inverting the condition to allow it to run when 'RAILS_BUILD' is not set,
ensuring proper functionality during development and testing phases.
- Change the condition to prevent sitemap refresh in production when
`RAILS_BUILD` is set.
- Ensures that the task only runs in development or non-production
environments, avoiding potential conflicts or wasted resources.
This change helps to streamline the initialization process and enhances
performance by not triggering unnecessary background tasks.
- Modified the schedule_tasks.rb initializer to only run RefreshSitemapWorker.perform_async unless RAILS_BUILD environment variable is set
This change optimizes the build process by preventing unnecessary sitemap refreshes during build time, thus improving overall project performance.
- Change stats div to be responsive
- Adjust coordinates display format for better readability
This update enhances the layout of the city show view by making
it more responsive and improving the display of weather and
geographical data. Additionally, the startup task for
refreshing the sitemap is now consistently executed,
removing unnecessary complexity.
- Update schedule tasks to use Sidekiq and Redis
- Improve task scheduling with caching
- Remove unnecessary code and error handling
This change enhances the reliability and performance of the startup task, leveraging the power of Sidekiq and Redis for background job processing and caching. The improvements ensure a smoother and more efficient application startup experience.
This commit adds a newline at the end of the 'schedule_tasks.rb' file to comply with the standard coding practices. Proper file formatting helps in maintaining code consistency across the project.
- Updated schedule_tasks.rb to include RAILS_BUILD check
- Improved application startup behavior in development mode
This change ensures the startup task does not run unnecessarily in development environment, reducing application startup time and resources usage.
- Schedule RefreshSitemapWorker after initialization
- Implement error handling for scheduling task
- Use Rails cache to prevent multiple tasks running simultaneously
This commit introduces a mechanism that schedules the
RefreshSitemapWorker to run once after the application starts
in production. It ensures that the task does not run
multiple times concurrently by using a cache key.
Error handling is included to log any failures
in scheduling the task, improving overall reliability.