def threaded_prune_jobs():
    """
    Sometimes failure happens, but a Nommer doesn't handle said failure
    gracefully. Instead of state changing to ``ERROR``, it gets stuck in
    some un-finished state in the SimpleDB_ domain defined in
    :py:data:`SIMPLEDB_JOB_STATE_DOMAIN <media_nommer.conf.settings.SIMPLEDB_JOB_STATE_DOMAIN>`
    setting.
    
    This process finds jobs that haven't been updated in a very long time
    (a day or so) that are probably dead. It marks them with an ``ABANDONED``
    state, letting us know something went really wrong.
    """
    JobCache.abandon_stale_jobs()
    # Expire any newly abandoned jobs, too. Removes them from job cache.
    JobCache.uncache_finished_jobs()
def threaded_prune_jobs():
    """
    Sometimes failure happens, but a Nommer doesn't handle said failure
    gracefully. Instead of state changing to ``ERROR``, it gets stuck in
    some un-finished state in the SimpleDB_ domain defined in
    :py:data:`SIMPLEDB_JOB_STATE_DOMAIN <media_nommer.conf.settings.SIMPLEDB_JOB_STATE_DOMAIN>`
    setting.

    This process finds jobs that haven't been updated in a very long time
    (a day or so) that are probably dead. It marks them with an ``ABANDONED``
    state, letting us know something went really wrong.
    """
    JobCache.abandon_stale_jobs()
    # Expire any newly abandoned jobs, too. Removes them from job cache.
    JobCache.uncache_finished_jobs()