@control_command(args=[(u'task_name', text_t), (u'soft', float), (u'hard', float)], signature=u'<task_name> <soft_secs> [hard_secs]')
def time_limit(state, task_name=None, hard=None, soft=None, **kwargs):
 try:
  task = state.app.tasks[task_name]
 except KeyError:
  logger.error(u'Change time limit attempt for unknown task %s', task_name, exc_info=True)
  return nok(u'unknown task')
 task.soft_time_limit = soft
 task.time_limit = hard
 logger.info(u'New time limits for tasks of type %s: soft=%s hard=%s', task_name, soft, hard)
 return ok(u'time limits set successfully')

@ control_command ( args = [ ( u'task_name' , text_t ) , ( u'soft' , float ) , ( u'hard' , float ) ] , signature = u'<task_name> <soft_secs> [hard_secs]' ) def time_limit ( state , task_name = None , hard = None , soft = None , ** kwargs ) : try : task = state . app . tasks [ task_name ] except KeyError : logger . error ( u'Change time limit attempt for unknown task %s' , task_name , exc_info = True ) return nok ( u'unknown task' ) task . soft_time_limit = soft task . time_limit = hard logger . info ( u'New time limits for tasks of type %s: soft=%s hard=%s' , task_name , soft , hard ) return ok ( u'time limits set successfully' )
tell worker(s) to modify the time limit for task by type .