Example #1
0
def _task_sig_stop(sig, frame):
    """Signal handler for the 'stop' signal sent by BibSched."""
    write_message("task_sig_stop(), got signal %s frame %s" % (sig, frame),
                  verbose=9)
    write_message("stopping as soon as possible...")
    _db_login(1)  # To avoid concurrency with an interrupted run_sql call
    task_update_status("ABOUT TO STOP")
Example #2
0
def _task_sig_sleep(sig, frame):
    """Signal handler for the 'sleep' signal sent by BibSched."""
    signal.signal(signal.SIGTSTP, signal.SIG_IGN)
    write_message("task_sig_sleep(), got signal %s frame %s" % (sig, frame), verbose=9)
    write_message("sleeping as soon as possible...")
    _db_login(1)
    task_update_status("ABOUT TO SLEEP")
Example #3
0
def _task_sig_stop(sig, frame):
    """Signal handler for the 'stop' signal sent by BibSched."""
    write_message("task_sig_stop(), got signal %s frame %s"
            % (sig, frame), verbose=9)
    write_message("stopping as soon as possible...")
    _db_login(1) # To avoid concurrency with an interrupted run_sql call
    task_update_status("ABOUT TO STOP")
Example #4
0
def _task_sig_sleep(sig, frame):
    """Signal handler for the 'sleep' signal sent by BibSched."""
    signal.signal(signal.SIGTSTP, signal.SIG_IGN)
    write_message("task_sig_sleep(), got signal %s frame %s" % (sig, frame),
                  verbose=9)
    write_message("sleeping as soon as possible...")
    _db_login(1)
    task_update_status("ABOUT TO SLEEP")
Example #5
0
def _task_sig_suicide(sig, frame):
    """Signal handler for the 'suicide' signal sent by BibSched."""
    write_message("task_sig_suicide(), got signal %s frame %s" % (sig, frame), verbose=9)
    write_message("suiciding myself now...")
    task_update_status("SUICIDING")
    write_message("suicided")
    _db_login(1)
    task_update_status("SUICIDED")
    sys.exit(1)
Example #6
0
def _task_sig_suicide(sig, frame):
    """Signal handler for the 'suicide' signal sent by BibSched."""
    write_message("task_sig_suicide(), got signal %s frame %s" % (sig, frame),
                  verbose=9)
    write_message("suiciding myself now...")
    task_update_status("SUICIDING")
    write_message("suicided")
    _db_login(1)
    task_update_status("SUICIDED")
    sys.exit(1)