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
Configure Que while in rake task #95
Comments
Hmm, yeah, it probably makes more sense to use the configured logger (which defaults to Rails.logger) in the rake task. I'll make that change, unless anyone has any objections? |
Since Que doesn't load rails initializers, could makes sense to add a way to include a configuration script for the rake task? |
The rake task has the :environment task as a dependency, so it should be running the initializers. It just manually sets the logging to go to STDOUT afterward. Are you sure it isn't running the initializers? |
Ops you're right, it was foreman blocking stdout output. Anyway yes, the only thing I would need is to be able to configure the logger while in rake task |
Would it work for you to use the Rails logger, or whatever Que is configured to use for logging in general? I don't want to have separate configuration options for working jobs in the server process and in a rake task unless it's really necessary. |
For now yes, since I just want to be able to use loggly within the rake task 😉 |
Alright, would you try the |
@chanks sorry for the delay, the branch works fine! |
No problem, good to hear! |
Merged and released in 0.10.0. |
I'm trying to configure logging, while in a rails process it uses
Rails.logger
for logs, in the rake task it usesSTDOUT
. Is there a convention in where to configure Que while running in the rake task?So I don't have to put everything in the workers
The text was updated successfully, but these errors were encountered: