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

not running jobs #168

Closed
nik736 opened this issue Oct 27, 2020 · 1 comment
Closed

not running jobs #168

nik736 opened this issue Oct 27, 2020 · 1 comment

Comments

@nik736
Copy link

nik736 commented Oct 27, 2020

Hello,

Thanks for this gem! I am kind of confused. Scenario: Production Environment. I am starting puma simply by typing:
bundle exec puma -e production -d

I am using:
config.active_job.queue_adapter = :good_job

From the docs I assume the execution_mode is set to external because of the production environment.

So far so good, the jobs are written to the database, but they are never executed. When I run:

RAILS_ENV=production bundle exec good_job

The jobs are not executed. How do I actually run them?

Thanks! :)

@bensheldon
Copy link
Owner

@nik736 thanks for opening an issue. I'm not quite sure what the problem is and am not able to reproduce it.

My initial thought is that bundle exec puma -e production doesn't set Rails.env == 'production' but from doing some poking it does seem like the environment is set correctly.

RAILS_ENV=production bundle exec good_job should run any jobs that are enqueued in in the good_jobs database table of the production database. It should check for jobs to execute every GOOD_JOB_POLL_INTERVAL which is 5 seconds by default.

If you can share more of your project, or make a demonstration repo I could maybe see if there is some configuration that is in the wrong place.

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

2 participants