code: async def _handle_job_queue_update(self, message: BackendGetQueue):
          
          self._logger.debug("Received job queue update")
          self._queue_update_last_attempt = 0
          self._queue_cache = message
  
          # Do some precomputation
          new_job_queue_cache = {}
          # format is job_id: (nb_jobs_before, max_remaining_time)
          for (job_id, is_local, _, _2, _3, _4, max_end) in message.jobs_running:
              if is_local:
                  new_job_queue_cache[job_id] = (-1, max_end - time.time())
          wait_time = 0
          nb_tasks = 0
          for (job_id, is_local, _, _2, timeout) in message.jobs_waiting:
              if timeout > 0:
                  wait_time += timeout
              if is_local:
                  new_job_queue_cache[job_id] = (nb_tasks, wait_time)
              nb_tasks += 1
  
          self._queue_job_cache = new_job_queue_cache
docs: Handles a BackendGetQueue containing a snapshot of the job queue