Skip to content

Commit

Permalink
Added sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
devikamehra committed Jul 17, 2023
1 parent ba5d2d2 commit dde8497
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ async def main(msg: func.QueueMessage) -> None:
await process_file_secondary_CLv2(bucket, link, client, session)
else:
await process_file_primary_CLv2(bucket, link, client, session, eventsSchemaMappingDict, requiredFieldsMappingDict)
logging.info("Successfully executed {} Bucket.".format(link))
except Exception as e:
logging.error('Error while processing bucket. Error: {}'.format(link, str(e)))

Check warning

Code scanning / CodeQL

Unused argument in a formatting call Warning

Too many arguments for string format. Format
"Error while processing bucket. Error: {}"
requires only 1, but 2 are provided.
raise e
Expand Down Expand Up @@ -174,6 +173,7 @@ async def process_file_primary_CLv2(bucket, s3_path, client, session, eventsSche
async for decompressed_chunk in AsyncGZIPDecompressedStream(response["Body"]):
s += decompressed_chunk.decode(errors='ignore')
lines = re.split(r'{0}'.format(LINE_SEPARATOR), s)
await session.sleep(0)
for n, line in enumerate(lines):
if n < len(lines) - 1:
if line:
Expand Down
Binary file not shown.

0 comments on commit dde8497

Please sign in to comment.