Skip to content

Commit

Permalink
[backend] waiting_job.msg is now always a ClientNewJob
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonygego authored and GuillaumeDerval committed Dec 17, 2021
1 parent 73d2309 commit fc5c657
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions inginious/backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,8 @@ async def handle_client_get_queue(self, client_addr, _: ClientGetQueue):

#jobs_waiting: a list of tuples in the form
#(job_id, is_current_client_job, info, launcher, max_time)
jobs_waiting = list()

for job in self._waiting_jobs.values():
if isinstance(job.msg, ClientNewJob):
jobs_waiting.append((job.job_id, job.client_addr == client_addr, job.msg.course_id+"/"+job.msg.task_id, job.msg.launcher,
self._get_time_limit_estimate(job.msg)))
jobs_waiting = [(job.job_id, job.client_addr == client_addr, job.msg.course_id+"/"+job.msg.task_id, job.msg.launcher,
self._get_time_limit_estimate(job.msg)) for job in self._waiting_jobs.values()]

await ZMQUtils.send_with_addr(self._client_socket, client_addr, BackendGetQueue(jobs_running, jobs_waiting))

Expand Down

0 comments on commit fc5c657

Please sign in to comment.