Worker started every secondes
DavidHenryThoreau opened this issue · 5 comments
I'm looking at docker logs workout-tracker -f
It's appears a worker starts every secondes, is that normal ?
"time":"2024-05-07T11:12:53.151237364+02:00","level":"INFO","msg":"Worker started...","app":"workout-tracker","version":"v0.14.2"
{"time":"2024-05-07T11:12:53.153765084+02:00","level":"INFO","msg":"Worker finished...","app":"workout-tracker","version":"v0.14.2","s
{"time":"2024-05-07T11:14:53.167323297+02:00","level":"INFO","msg":"Worker started...","app":"workout-tracker","version":"v0.14.2","
{"time":"2024-05-07T11:14:53.16989256+02:00","level":"INFO","msg":"Worker finished...","app":"workout-tracker","version":"v0.14.2",
It seems from your logs to start every two minutes; you see a log line when it starts, and when it finishes.
... which is strange, because the code says it should sleep for one minute...
Yes, every two minutes.
Do you have documentation about that worker ?
Not really; you mean what it is expected to do?
It's strange that waits every two minutes, I mean it could be better to trigger an action if something is happened instead of watting every two minutes ?
It checks if any user has an import directory (and then checks if something should be imported), and if any workouts should be re-parsed (for bulk operations which take too long to run live)