## Process already running (typing too quickly on the keyboard?)
pass
else:
self.display_in_footer("Process %s is not in the list of allowed processes."%process)
else:
self.display_in_footer("Process status should be SCHEDULED or WAITING!")
defacknowledge_task(self):
task_id=self.currentrow[0]
task_name=self.currentrow[1]
status=self.currentrow[5]
ifstatusin('ERROR','DONE WITH ERRORS','ERRORS REPORTED'):
argv=task_get_options(task_id,task_name)
sleeptime=get_sleeptime(argv)
ifnotsleeptimeorself._display_YN_box("WARNING! This is a periodic task.\n\nAre you sure you want to acknowledge the %s process %s?"%(task_name,task_id)):
bibsched_set_status(task_id,'ACK '+status,status)
self.update_rows()
self.repaint()
self.display_in_footer("Acknowledged error")
defdebug_task(self):
task_id=self.currentrow[0]
bibsched_send_signal(task_id,signal.SIGUSR2)
self.display_in_footer("Task set in debug mode")
defsleep_task(self):
task_id=self.currentrow[0]
status=self.currentrow[5]
ifstatusin('RUNNING','CONTINUING'):
bibsched_set_status(task_id,'ABOUT TO SLEEP',status)
self.update_rows()
self.repaint()
self.display_in_footer("SLEEP signal sent to task #%s"%task_id)
else:
self.display_in_footer("Cannot put to sleep non-running processes")
defkill_task(self):
task_id=self.currentrow[0]
process=self.currentrow[1]
status=self.currentrow[5]
ifstatusin('RUNNING','CONTINUING','ABOUT TO STOP','ABOUT TO SLEEP','SLEEPING'):
ifself._display_YN_box("Are you sure you want to kill the %s process %s?"%(process,task_id)):
bibsched_send_signal(task_id,signal.SIGKILL)
bibsched_set_status(task_id,'KILLED')
self.update_rows()
self.repaint()
self.display_in_footer("KILL signal sent to task #%s"%task_id)
where="WHERE status IN ('RUNNING', 'CONTINUING', 'SCHEDULED', 'ABOUT TO STOP', 'ABOUT TO SLEEP', 'SLEEPING', 'WAITING', 'ERRORS REPORTED', 'DONE WITH ERRORS', 'ERROR', 'CERROR', 'KILLED', 'STOPPED')"