You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of the worker having to handle writing to the database or outputting logs to the terminal, the worker should only:
take in buckets from input channel
scan them
push them into output channel
then s3scanner.Run() should wait for buckets to be pushed into the output channel and handle writing to the database and writing logs.
I think this is what "clean code" is referring to.
We'll need to add tests to verify the output channel is closed at appropriate times and the program exits gracefully. Once we make this change, we should be able to combine the 2 worker classes into a unified worker.
The text was updated successfully, but these errors were encountered:
Instead of the worker having to handle writing to the database or outputting logs to the terminal, the worker should only:
then
s3scanner.Run()
should wait for buckets to be pushed into the output channel and handle writing to the database and writing logs.I think this is what "clean code" is referring to.
We'll need to add tests to verify the output channel is closed at appropriate times and the program exits gracefully. Once we make this change, we should be able to combine the 2 worker classes into a unified worker.
The text was updated successfully, but these errors were encountered: