-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading to 1.1.1 makes recurring job to fail #468
Comments
🤔 it seems that |
Same for me, I had remove the environment in order to boot solid queue. See if this works: periodic_cleanup:
class: CloseTripsJob
queue: background
schedule: every hour |
it started failing when upgraded to |
Same issue for me. |
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. |
@jnstq nothing has changed regarding the environment keys in |
Oh, @max-chem-eng, I just realised that the recurring task failing for you is |
thanks for your input development:
periodic_cleanup:
class: CloseTripsJob
queue: background
schedule: every second I see it running without issues If I update it to Invalid recurring tasks:
- production: Schedule is not a supported recurring schedule, either command or class_name must be present regardless I run it as plug in or in its own terminal EDIT: it only fails if the only environment declared is production and trying to run the app in development |
In my case it's working fine in development, but the workers are failing in production once updating to 1.1.1. I reverted and then upgraded again in prod and still getting the same issue. |
Right ok, I've dug into the failure trying to manually kick off bin/jobs in a container on prod; in my case the error was:
Increasing the I can see this check was added to 1.1.1, so was the issue in my case: solid_queue/lib/solid_queue/configuration.rb Lines 78 to 83 in e0921d2
|
For example, `production` only, and the configuration is being loaded for `development`. In this case, we can't take the env key as the task definition, failing to load Solid Queue at all. Fixes #468
thanks! |
Ok, just released version 1.1.2 with a fix for the recurring configuration when not all environments are defined. Sorry about that! |
Hello, after updating I noticed the following raises an error: development:
# nothing /Users/david/.local/share/mise/installs/ruby/3.4.0/lib/ruby/gems/3.4.0+1/gems/solid_queue-1.1.2/lib/solid_queue/configuration.rb:144:in 'block in SolidQueue::Configuration#recurring_tasks': undefined method 'has_key?' for nil (NoMethodError)
RecurringTask.from_configuration(id, **options) if options.has_key?(:schedule)
^^^^^^^^^
from /Users/david/.local/share/mise/installs/ruby/3.4.0/lib/ruby/gems/3.4.0+1/gems/solid_queue-1.1.2/lib/solid_queue/configuration.rb:143:in 'Hash#each'
from /Users/david/.local/share/mise/installs/ruby/3.4.0/lib/ruby/gems/3.4.0+1/gems/solid_queue-1.1.2/lib/solid_queue/configuration.rb:143:in 'Enumerable#map'
from /Users/david/.local/share/mise/installs/ruby/3.4.0/lib/ruby/gems/3.4.0+1/gems/solid_queue-1.1.2/lib/solid_queue/configuration.rb:143:in 'SolidQueue::Configuration#recurring_tasks' Removing |
Oops, yes! I'll fix that. Agh. So sorry @dgmora! |
Fixed in #475 |
Ruby: 3.4.1
Rails: 8.0.1
solid_queue
running as a plug_inThis simple recurring job fails:
with this error:
EDIT: it only fails if the only environment declared is production and trying to run the app in development
The text was updated successfully, but these errors were encountered: