suite
suite copied to clipboard
Getting mobius to consume the queue?
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:
-
Get suite up and running, create a sudo user and create an API key.
-
Create some shifts
-
Configure mobius (self-hosted) with the API key, start
server.sh
. Polling commences. -
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.
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
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
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?
API keys get the permissions of the user. Sudo users have global access, so an API key from that account has system-wide access.