logtail / logtail-python

Better Stack Python client
https://betterstack.com/logs
Other
36 stars 10 forks source link

Use regular queue, use flush thread per process, delay worker init #11

Closed curusarn closed 1 year ago

curusarn commented 1 year ago

Use regular queue, use flush thread per process -> general changes to make this work better with serverless

Delay worker init -> Fixes issues with logtail-python on Render

curusarn commented 1 year ago

The tests are passing - there are no errors in the Job logs. I don't know why GitHub is not marking them green.

evanmays commented 1 year ago

Looks like forgot to bump version number here https://github.com/logtail/logtail-python/blob/master/logtail/__init__.py

evanmays commented 1 year ago

Were the Logtail on render bugs documented anywhere? Why delay the worker?

curusarn commented 1 year ago

Were the Logtail on render bugs documented anywhere? Why delay the worker?

We were restarting threads by calling start() on them. On Render.com, it's common for threads to be stopped, so we were seeing threads can only be started once errors. Now we create a new thread object when restarting it instead of reusing the same thread object.