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

Using without Rails #19

Open
raldred opened this issue Mar 28, 2024 · 1 comment
Open

Using without Rails #19

raldred opened this issue Mar 28, 2024 · 1 comment

Comments

@raldred
Copy link

raldred commented Mar 28, 2024

Just wondered if it would be possible to make this support running without Rails?
We have an app which runs jobs with delayed_job but no Rails on Heroku.
Was hoping this might help us to increase the number of jobs we can process without scaling dynos horizontally or re-architecturing to sidekiq for now.

When running without Rails we hit the following error, regardless of setting preload_app (true|false):

Worker failed with error: Could not find Rails initialization file /app/config/environment.rb. Make sure delayed_job_worker_pool is run from the Rails root directory
@jturkel
Copy link
Member

jturkel commented Apr 2, 2024

The preload_app setting controls whether the DelayedJobWorkerPool::Application.load method is invoked in the controller process before forking any workers or in the workers post-fork. The DelayedJobWorkerPool::Application.load assumes it's a Rails app but a PR would be welcome that adds a configurable load app hook for non-Rails apps.

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