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

Only start async mode executors when server is running #194

Closed
bensheldon opened this issue Jan 11, 2021 · 1 comment · Fixed by #230
Closed

Only start async mode executors when server is running #194

bensheldon opened this issue Jan 11, 2021 · 1 comment · Fixed by #230

Comments

@bensheldon
Copy link
Owner

bensheldon commented Jan 11, 2021

Addresses trouble identified in #184

@bensheldon
Copy link
Owner Author

I'm thinking of introducing a new execution mode, async_server that will only run when Rails::Server is defined.

This matches how I'm currently running in my own applications and inside of the test app:

if ENV['GOOD_JOB_EXECUTION_MODE']
config.good_job.execution_mode = ENV['GOOD_JOB_EXECUTION_MODE'].to_sym
elsif Rails.const_defined?("Server")
config.good_job.execution_mode = :async
elsif Rails.const_defined?("Console")
config.good_job.execution_mode = :external
end

@bensheldon bensheldon changed the title Only start async mode executors when server or console is running Only start async mode executors when server ~or console is running~ Apr 8, 2021
@bensheldon bensheldon changed the title Only start async mode executors when server ~or console is running~ Only start async mode executors when server ~~or console is running~~ Apr 8, 2021
@bensheldon bensheldon changed the title Only start async mode executors when server ~~or console is running~~ Only start async mode executors when server is running Apr 8, 2021
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

Successfully merging a pull request may close this issue.

1 participant