Closed elpaso closed 3 years ago
The check for Worker-1
fixes the startup issue for me but I suspect that there is more: shouldn't you close the connection as the db_task
decorator does?
@on_startup()
def startup_handler():
if multiprocessing.current_process().name == 'Worker-1':
logger.debug('startup handler called for %s' %
multiprocessing.current_process().name)
with transaction.atomic():
Hm... SSL error
sounds like a other not related error than not closed connections... Do you have use out test docker-compose
project via make up
?
I changed https://github.com/boxine/django-huey-monitor/blob/41fa9f163bb11caf5da7fa50d7490f50daaa93c0/docker/huey/entrypoint.sh#L29
and also set --workers 5
... I add a print(len(connections.all()))
in both existing signal handlers... It prints always 1
... So i think a explicit handling is not needed here, isn't it?!?
Hi,
I'm testing this module with
--worker-type process
and 5 workers.Note that the error does not appear when I use a single worker.