File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Monitoring/ingest_nas_audit_logs_into_cloudwatch Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -326,9 +326,6 @@ def lambda_handler(event, context): # pylint: disable=W0613
326326 else :
327327 lastFileRead = json .loads (response ['Body' ].read ().decode ('utf-8' ))
328328 #
329- # Only update the lastFileRead if we actually copied a new file.
330- lastFileReadChanged = False
331- #
332329 # Process each FSxN.
333330 for fsxn in fsxNs :
334331 fsId = fsxn .split ('.' )[1 ]
@@ -372,11 +369,7 @@ def lambda_handler(event, context): # pylint: disable=W0613
372369 # Process the file.
373370 processFile (fsxn , headersDownload , volumeUUID , filePath )
374371 lastFileRead [fsxn ] = getEpoch (filePath )
375- lastFileReadChanged = True
376- #
377- # Save the last read stats file.
378- if lastFileReadChanged :
379- s3Client .put_object (Key = config ['statsName' ], Bucket = config ['s3BucketName' ], Body = json .dumps (lastFileRead ).encode ('UTF-8' ))
372+ s3Client .put_object (Key = config ['statsName' ], Bucket = config ['s3BucketName' ], Body = json .dumps (lastFileRead ).encode ('UTF-8' ))
380373#
381374# If this script is not running as a Lambda function, then call the lambda_handler function.
382375if os .environ .get ('AWS_LAMBDA_FUNCTION_NAME' ) == None :
You can’t perform that action at this time.
0 commit comments