Skip to content

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

Open

Description

@italomaia

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?

Activity

  1. zgoda commented on Sep 21, 2017

    @zgoda

    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.

  2. jezdez commented on Dec 4, 2017

    @jezdez
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions