File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -119,9 +119,6 @@ def runCellProfiler(message):
119119 else : #backwards compatability with 1.0.0 and/or no desire to structure output
120120 metadataID = '-' .join ([x .split ('=' )[1 ] for x in message ['Metadata' ].split (',' )]) # Strip equal signs from the metadata
121121
122- watchtowerlogger = watchtower .CloudWatchLogHandler (log_group = LOG_GROUP_NAME , stream_name = metadataID ,create_log_group = False )
123- logger .addHandler (watchtowerlogger )
124-
125122 localOut = LOCAL_OUTPUT + '/%(MetadataID)s' % {'MetadataID' : metadataID }
126123 remoteOut = os .path .join (message ['output' ],metadataID )
127124 replaceValues = {'PL' :message ['pipeline' ], 'OUT' :localOut , 'FL' :message ['data_file' ],
@@ -139,6 +136,10 @@ def runCellProfiler(message):
139136 except KeyError : #Returned if that folder does not exist
140137 pass
141138
139+ # Start loggging now that we have a job we care about
140+ watchtowerlogger = watchtower .CloudWatchLogHandler (log_group = LOG_GROUP_NAME , stream_name = metadataID ,create_log_group = False )
141+ logger .addHandler (watchtowerlogger )
142+
142143 # Build and run CellProfiler command
143144 cpDone = localOut + '/cp.is.done'
144145 if message ['pipeline' ][- 3 :]!= '.h5' :
You can’t perform that action at this time.
0 commit comments