-
Notifications
You must be signed in to change notification settings - Fork 160
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
recurring task argument not successfully passing all ActiveJob supported types #183
Comments
Hey @hms, yes, this is expected as the way this is implemented allows only types supported by YAML. I went for this for simplicity, pretty much mirroring the way resque-scheduler's static schedules work, as this is what we've used before when we couldn't rely on Unix's However, I'd be happy to consider any contributions that enhance this! |
Hi Rosa, Once I figure out how to get Docker and the tests working on my fork, I might make a run at this and #176 (something that would make my life a little better). Until then, could we update the Readme with the officially supported argument types? |
Of course, sure thing! 🙏 What's not working for you when you run |
@rosa Sorry for going radio silent, getting crushed on a delivery. Can I get back to this in a week or 2? |
Hey @hms, of course, no worries at all! 🙏 |
Finally going to close this one as not planned. |
I'm sorry for not following up on this. Turns out with a little ERB or paying attention to the Pysch docs, the above example is possible. I just didn't realize that I could use ERB in the config.yml files. I just did a quick scan of the docs and the fact that one can use ERB isn't mentioned. If you would like a PR on the readme.md to call out the ERB processing is supported, I'm happy to make one. |
@hms no worries at all! I think the problem with using ERB and manually serializing the arguments (which might be confusing or not) is that it'd be evaluated when the configuration is loaded. That is,
This is true for all configuration files loaded via |
I ran into a problem with passing an ActiveSupport::Duration to a recurring job.
I built a couple of jobs that just pass arguments and check that they are received as the expected types. I tested each of the supported type described on the Rails guides Active Job Basics.
Sample solid_queue.yml:
The text was updated successfully, but these errors were encountered: