#NEWLINE# def _serialiseJob( self , jobStore , jobsToJobWrappers , rootJobWrapper ) : #NEWLINE# #INDENT# '\n        Pickle a job and its jobWrapper to disk.\n        ' #NEWLINE# ( self . _children , self . _followOns , self . _services ) = ( [ ] , [ ] , [ ] ) #NEWLINE# ( self . _directPredecessors , self . _promiseJobStore ) = ( set ( ) , None ) #NEWLINE# with jobStore . writeFileStream ( rootJobWrapper . jobStoreID ) as ( fileHandle , fileStoreID ) : #NEWLINE# #INDENT# cPickle . dump ( self , fileHandle , cPickle . HIGHEST_PROTOCOL ) #NEWLINE# #UNINDENT# userScript = self . getUserScript ( ) . globalize ( ) #NEWLINE# jobsToJobWrappers [ self ] . command = ' ' . join ( ( ( '_toil' , fileStoreID ) + userScript ) ) #NEWLINE# jobStore . update ( jobsToJobWrappers [ self ] )