#NEWLINE# def requeue( self , queue = None , retry_count = 0 ) : #NEWLINE# #INDENT# " Requeues the current job. Doesn't interrupt it " #NEWLINE# if ( not queue ) : #NEWLINE# #INDENT# if ( ( not self . data ) or ( not self . data . get ( 'queue' ) ) ) : #NEWLINE# #INDENT# self . fetch ( full_data = { #NEWLINE# #INDENT# '_id' : 0 , #NEWLINE# 'queue' : 1 , #NEWLINE# 'path' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# queue = self . data [ 'queue' ] #NEWLINE# #UNINDENT# from . queue import Queue #NEWLINE# queue_obj = Queue ( queue ) #NEWLINE# self . _save_status ( 'queued' , updates = { #NEWLINE# #INDENT# 'queue' : queue , #NEWLINE# 'retry_count' : retry_count , #NEWLINE# #UNINDENT# } ) #NEWLINE# queue_obj . enqueue_job_ids ( [ str ( self . id ) ] )