Skip to content
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

wait_until in development? #330

Closed
ghost opened this issue Aug 12, 2021 · 1 comment
Closed

wait_until in development? #330

ghost opened this issue Aug 12, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 12, 2021

Great gem, love it! (This really should be built in to Rails...)

It's really a bummer that wait_until does not work in development (i.e., GoodJob seems hard-coded to execute all jobs immediately in development, regardless of what DateTime they are scheduled at).

Would it be at all possible to have at least a flag to disable this "feature"? (Maybe not technically possible when execution mode set to inline? If so, make it dependent on that instead of Rails.env?)

The thing is, when all of my jobs run immediately, for example, if I schedule a job that sets up a feature to send out e-mails next week, and they all deliver immediately in my log, I can't tell if this is due to my code or to GoodJob running in immediate/development mode.

Thanks!!

@bensheldon
Copy link
Owner

By default GoodJob runs :inline in Development. What you want is :async_server, which is a single line addition:

# config/environments/development.rb
config.good_job.execution_mode = :async_server

I plan to make :async_server the development default in GoodJob v2.0. Maybe it doesn't actually need to wait, but SEMVER leaves a lot of open questions like this 😄 Give me a good argument.

Great gem, love it! (This really should be built in to Rails...)

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant