Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Errors are now logged more or less directly after failure upon exiting the
verify_proceed
wrapper. Since multiple threads could be appending lines to the log, I changed the format of the log so that each line is valid json but the entire file is unfortunately not. Parsing should be easy enough just reading line by line.I ran 32 threads (on my laptop though) and multiple threads appending to the file did not cause any issues, but I'm not sure it's a recommended praxis. Safer would be to have a single thread taking care of the logging or keeping a global lock variable in the owning class perhaps.
However, I think there might be better ways of making sure that the bucket and database is in sync which seems to be the ultimate goal of this log.