private void checkForAbandonedTask(Tenant tenant, TaskRecord taskRecord, long minsSinceLastActivity) {
        if (minsSinceLastActivity > DEAD_TASK_THRESHOLD_MINS) {
            String taskIdentity = createMapKey(tenant, taskRecord.getTaskID());
            String reason = "No progress reported in " + minsSinceLastActivity + " minutes";
            m_logger.error("Remote task {} has not reported progress in {} minutes; marking as failed",
                           taskIdentity, minsSinceLastActivity);
            taskRecord.setProperty(TaskRecord.PROP_FINISH_TIME, Long.toString(System.currentTimeMillis()));
            taskRecord.setProperty(TaskRecord.PROP_FAIL_REASON, reason);
            taskRecord.setStatus(TaskStatus.FAILED);
            updateTaskStatus(tenant, taskRecord, true);
        }
    }
private void checkForAbandonedTask ( Tenant tenant , TaskRecord taskRecord , long minsSinceLastActivity ) { if ( minsSinceLastActivity > DEAD_TASK_THRESHOLD_MINS ) { String taskIdentity = createMapKey ( tenant , taskRecord . getTaskID ( ) ) ; String reason = "No progress reported in " + minsSinceLastActivity + " minutes" ; m_logger . error ( "Remote task {} has not reported progress in {} minutes; marking as failed" , taskIdentity , minsSinceLastActivity ) ; taskRecord . setProperty ( TaskRecord . PROP_FINISH_TIME , Long . toString ( System . currentTimeMillis ( ) ) ) ; taskRecord . setProperty ( TaskRecord . PROP_FAIL_REASON , reason ) ; taskRecord . setStatus ( TaskStatus . FAILED ) ; updateTaskStatus ( tenant , taskRecord , true ) ; } }
to restart upon the next check-tasks cycle.