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

butler.job doesn't work in myApp.py? #186

Open
dconathan opened this issue May 3, 2017 · 3 comments
Open

butler.job doesn't work in myApp.py? #186

dconathan opened this issue May 3, 2017 · 3 comments

Comments

@dconathan
Copy link
Contributor

It appears butler.job doesn't work for submitting background jobs at the myApp level. This is because butler submits the job without a namespace, so the broker/celery ends up calling apply in tasks.py which calls getattr on App instead of myApp (it seems like normally the only thing that should be calling this is the frontend api)... is this a bug or a design choice, and if the latter is it documented?

@stsievert
Copy link
Member

Sounds like a bug. I would expect this to work regardless of where I call it from.

@dconathan
Copy link
Contributor Author

Cool. Thought it'd be as simple as setting the namespace but then it still tries to import the algorithm named butler.alg_label which is None.

@dconathan
Copy link
Contributor Author

It's very baked-in that this is only for alg methods. See these lines in tasks.py. Not sure what the most elegant method is. Probably do a if alg_id is None there and if so try to run the app version...

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