solid_queue: Upgrading to 1.1.1 makes recurring job to fail
Ruby: 3.4.1
Rails: 8.0.1
solid_queue running as a plug_in
This simple recurring job fails:
production:
periodic_cleanup:
class: CloseTripsJob
queue: background
schedule: every hour
with this error:
10:48:03 web.1 | Invalid recurring tasks:
10:48:03 web.1 | - production: Schedule is not a supported recurring schedule, either command or class_name must be present
10:48:03 web.1 | Exiting...
10:48:07 web.1 | Detected Solid Queue has gone away, stopping Puma...
EDIT: it only fails if the only environment declared is production and trying to run the app in development
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Don't fail when recurring tasks are defined for another environment For example, `production` only, and the configuration is being loaded for `development`. In this case, we can't take the env key as... — committed to rails/solid_queue by rosa 2 years ago
- Don't fail when recurring tasks are defined for another environment For example, `production` only, and the configuration is being loaded for `development`. In this case, we can't take the env key as... — committed to mjankowski/solid_queue by rosa 2 years ago
- Don't fail when recurring tasks are defined for another environment For example, `production` only, and the configuration is being loaded for `development`. In this case, we can't take the env key as... — committed to thomasnynas12/solid-queue-e by josephfennell3 2 years ago
- Don't fail when recurring tasks are defined for another environment For example, `production` only, and the configuration is being loaded for `development`. In this case, we can't take the env key as... — committed to KingStar365/solid_queue by KingStar365 2 years ago
Oops, yes! I’ll fix that. Agh. So sorry @dgmora!
To be clear, with 1.1.0, invalid recurring tasks would be silently ignored, leading to confusing situations where people didn’t know why they weren’t being run. With 1.1.1, these fail. If reverting to 1.1.0 works, fine, it might simply mean that they’re ignored.