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

Getting mobius to consume the queue? #45

Open
uvesten opened this issue Apr 21, 2017 · 3 comments
Open

Getting mobius to consume the queue? #45

uvesten opened this issue Apr 21, 2017 · 3 comments

Comments

@uvesten
Copy link

uvesten commented Apr 21, 2017

Short question, grateful for any pointers in the right direction.

I've managed to get suite up and running using docker-compose (and some manual wrangling). Can create users, roles, the whole shebang. Seems to work as it should.

However, I can't get mobius to consume any tasks from the queue.

Steps:

  1. Get suite up and running, create a sudo user and create an API key.

  2. Create some shifts

  3. Configure mobius (self-hosted) with the API key, start server.sh. Polling commences.

  4. Call cron to enqueue tasks. Works.

     {
       "schedules_created": 0,
       "schedules_queued_mobius": 12
     }
    

... However, nothing gets picked up by mobius. It just keeps reporting

2017-04-21T08:08:22 mobius-dev mobius DEBUG No task found. Sleeping.
2017-04-21T08:08:27 mobius-dev mobius DEBUG No task found. Sleeping.

And in /euler i just see a lot of entries like the one below.

img 2017-04-21 at 08 10 58

Is there something I'm missing? (On the main instance I see a lot of celery processes, so I guess the queue should be up.) Something more I need to do to get mobius to pick up the tasks?

Best regards,
/
uvesten

@philipithomas
Copy link
Member

Hmm, did you see the Self-Hosting part of the Mobius README, which was added in the last couple weeks? https://github.com/staffjoy/mobius-assignment

The odd thing seems to be that it is hitting the endpoint. Is it possible that you wiped the database in development but didn't flush redis? I would try a DELETE call to /api/v2/internal/caches/ to flush Redis

https://github.com/Staffjoy/suite/blob/master/app/apiv2/internal/caches/caches.py#L16

@uvesten
Copy link
Author

uvesten commented Apr 25, 2017

Thanks for the feedback!
Yes, I read about self-hosting, and I got it set up, so it's definitely polling the endpoint. Flushing redis made no difference, I guess I might have to dig deeper.

By the way, should an API key that I made for a sudo user have access to all tasks in the system? Or do I need to set up some special "system-wide" api key for mobius to use?

@philipithomas
Copy link
Member

API keys get the permissions of the user. Sudo users have global access, so an API key from that account has system-wide access.

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