-
Notifications
You must be signed in to change notification settings - Fork 122
Stop polling for pending jobs #180
Copy link
Copy link
Open
Description
Problem
Once a job is triggered by press on the build/other servers (Archive, New Bench etc.), a job is created on the press worker that polls for job status every 5 seconds (via hooks).
This problem causes obvious load on the servers.
Solution
Using sockets in agent (out of the box with flask-socketIo).
We also need to use gunicorn with eventlet. To allow for async connections
Steps
- Once a job is triggered by press on the server create a on_[success, failure] callback.
- These callbacks will trigger events / emit which let the client know the status of the job.
- This also requires a pub-sub mechanism as socketIo will have to emit these callback events from rq-worker processes.
Problems caused by the solution
- Job's have a certain order of being processed once completed this might break for which also needs to be address.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels