#NEWLINE# def requeue( self , job_id ) : #NEWLINE# #INDENT# 'Requeues the job with the given job ID.' #NEWLINE# with transaction . commit_on_success ( self . connection ) : #NEWLINE# #INDENT# job = Job . objects . using ( self . connection ) . select_for_update ( ) . get ( id = job_id ) #NEWLINE# job . queue = None #NEWLINE# job . status = Job . QUEUED #NEWLINE# job . exc_info = None #NEWLINE# job . scheduled_for = now ( ) #NEWLINE# job . save ( ) #NEWLINE# q = Queue . create ( job . origin , connection = self . connection ) #NEWLINE# q . enqueue_job ( job , timeout = job . timeout )