code: public synchronized void failTasksForWorker(long workerId) {
      Integer taskId = mWorkerIdToTaskId.get(workerId);
      if (taskId == null) {
        return;
      }
      TaskInfo taskInfo = mJobInfo.getTaskInfo(taskId);
      if (taskInfo.getStatus().isFinished()) {
        return;
      }
      taskInfo.setStatus(Status.FAILED);
      taskInfo.setErrorMessage("Job worker was lost before the task could complete");
      updateStatus();
    }
docs: Fails any incomplete tasks being run on the specified worker.
  
  @param workerId the id of the worker to fail tasks for