Skip to content

Stop polling for pending jobs #180

@Aradhya-Tripathi

Description

@Aradhya-Tripathi

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.

Metadata

Metadata

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