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 ( ) ; }
Fails any incomplete tasks being run on the specified worker .