songtianlun
84c224cf8d
- 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. |
||
---|---|---|
.. | ||
environments | ||
initializers | ||
locales | ||
application.rb | ||
boot.rb | ||
cable.yml | ||
cache.yml | ||
credentials.yml.enc | ||
database.yml | ||
deploy.yml | ||
environment.rb | ||
puma.rb | ||
queue.yml | ||
recurring.yml | ||
routes.rb | ||
schedule.rb | ||
sidekiq.yml | ||
sitemap.rb | ||
storage.yml |