def METHOD_NAME(job):
    """
    Cleanup jobs that were in the middle of processing when submitty_daemon_jobs_handler
    was killed.
    :param str job:
    :return:
    """
    logMessage(f"cleanup job {job}")
    with Path(QUEUE_DIR, job).open() as job_file:
        job_details = json.load(job_file)
    try:
        logMessage("cleanup job (will need to re-run): "+job)
        job_class = getattr(jobs, job_details['job'])(job_details)
        job_class.METHOD_NAME()
    except NameError:
        pass
    old_name = job.split('PROCESSING_')[1]
    Path(QUEUE_DIR, job).rename(Path(QUEUE_DIR, old_name))