alephdata / servicelayer

Common interface definitions for aleph toolkit services and applications
MIT License
7 stars 5 forks source link

Log worker retry count and retry count exhaustion #113

Closed stchris closed 1 year ago

stchris commented 1 year ago

While doing some log forensics recently @tillprochaska and I noticed that it might be helpful to log the current retry count and make it clear when we are giving up on retries.

Although I dislike doing two things in one PR I also changed the worker tests to pytest-style, which I needed for a new test which is using a fixture.

stchris commented 1 year ago

How much work would it be to make use of structured logging for the retry counts, so we can filter for e.g. jsonPayload.retry = 0? I think it might be enough to pass it as a keyword argument to the log method…

Oh that's a great idea, it should be straightforward. I'll look into it.