SIENTIAPDE-1318
Refactor app.py and enhance unit tests for better clarity and structure - Updated `app.py` to improve async compatibility with a clearer comment. - Added blank lines in `test_ingestor.py` for improved readability and organization of test cases.
This commit is contained in:
@@ -55,7 +55,7 @@ async def main():
|
||||
metrics.APP_LOOP_COUNT.labels(pod_id=POD_ID).inc() # Increment loop counter
|
||||
|
||||
# Use asyncio.sleep instead of exit_signal.wait for better async compatibility
|
||||
await asyncio.sleep(ingestor.poll_interval) # NOSONAR
|
||||
await asyncio.sleep(ingestor.poll_interval) # NOSONAR
|
||||
|
||||
except KeyboardInterrupt: # Handle Ctrl+C gracefully
|
||||
print('KeyboardInterrupt received. Setting exit_signal flag.')
|
||||
|
||||
Reference in New Issue
Block a user