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

Error: RQ object has no attribute 'scheduler_cls' #30

Open
italomaia opened this issue Jul 23, 2017 · 2 comments
Open

Error: RQ object has no attribute 'scheduler_cls' #30

italomaia opened this issue Jul 23, 2017 · 2 comments

Comments

@italomaia
Copy link

I'm running RQ2 on my docker instance and when I schedule a job with cron, I get the following error:

AttributeError: 'RQ' object has no attribute 'scheduler_cls'

Any ideas?

@zgoda
Copy link

zgoda commented Sep 21, 2017

Same on physical machine.

Traceback fragment:

  File "/home/jazg/work/zakwasy/zkw/sd/__init__.py", line 7, in <module>
    from ..sd import tasks  # noqa
  File "/home/jazg/work/zakwasy/zkw/sd/tasks.py", line 44, in <module>
    process_user_postcodes.cron('*/15 * * * *', 'process-user-postcodes')
  File "/home/jazg/v/zkw/local/lib/python2.7/site-packages/flask_rq2/helpers.py", line 115, in cron
    return self.rq.get_scheduler().cron(
  File "/home/jazg/v/zkw/local/lib/python2.7/site-packages/flask_rq2/app.py", line 287, in get_scheduler
    if self.scheduler_cls is None:
AttributeError: 'RQ' object has no attribute 'scheduler_cls'

RQ object is created empty and configured later in app factory.

@jezdez
Copy link
Member

jezdez commented Dec 4, 2017

Hmm hmm, the RQ class has class attributes called like that, so it's weird this is happening. I'm not sure how to reproduce this. Could you try again with current master (that has the refactor #41)?

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

3 participants