Describe the bug
In the deployed testnet, I can see that WorkerManager: Created WorkerManager is logged after the STDOUT of the agent. I'm not sure if this is a bug or if its just due to cloud watch reporting the 2 messages at the same time.
2022-07-04T07:13:37.048000+00:00 ecs/polykey-testnet/e6c450d3cf2443f785eaa0d98d122671 INFO:WorkerManager:Creating WorkerManager
2022-07-04T07:13:37.137000+00:00 ecs/polykey-testnet/e6c450d3cf2443f785eaa0d98d122671 {"pid":1,"nodeId":"v7osqo4g9uca06qb48ra7pbpergp59qtdh9584a0j0a4ud80qgaig","clientHost":"0.0.0.0","clientPort":1315,"agentHost":"127.0.0.1","agentPort":36631,"proxyHost":"0.0.0.0","proxyPort":1314,"forwardHost":"127.0.0.1","forwardPort":42899,"recoveryCode":"adjust broom select dish major portion arm horn kit thrive onion coil margin brother arctic skin equip soup mango club thought like guard sister"}
2022-07-04T07:13:37.137000+00:00 ecs/polykey-testnet/e6c450d3cf2443f785eaa0d98d122671 INFO:WorkerManager:Created WorkerManager
Do note that the 2 message timestamps are exactly the same, even the milliseconds 2022-07-04T07:13:37.137000+00:00. It could just due to the fact that the task is set to mode: non-blocking logging which causes the message to arrive out of order.
Part of the problem is that STDOUT and STDERR are interleaved in cloudwatch, so maybe that's the issue too.
Check the code too as we should definitely wait for worker manager to be fully created before we print out the agent status.
To Reproduce
- Run
pk agent start
- Observe
WorkerManager: Created WorkerManager
Expected behavior
- Message should arrive and be printed out before the final STDOUT.
Additional context
Notify maintainers
@CMCDragonkai
Describe the bug
In the deployed testnet, I can see that
WorkerManager: Created WorkerManageris logged after the STDOUT of the agent. I'm not sure if this is a bug or if its just due to cloud watch reporting the 2 messages at the same time.Do note that the 2 message timestamps are exactly the same, even the milliseconds
2022-07-04T07:13:37.137000+00:00. It could just due to the fact that the task is set tomode: non-blockinglogging which causes the message to arrive out of order.Part of the problem is that STDOUT and STDERR are interleaved in cloudwatch, so maybe that's the issue too.
Check the code too as we should definitely wait for worker manager to be fully created before we print out the agent status.
To Reproduce
pk agent startWorkerManager: Created WorkerManagerExpected behavior
Additional context
Notify maintainers
@CMCDragonkai