OpenSlides / openslides-media-service

Media service for OpenSlides 3+
MIT License
0 stars 14 forks source link

Traceback on container exit #72

Closed peb-adr closed 1 year ago

peb-adr commented 1 year ago
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 142, in init_process
    self.run()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 126, in run
    self.run_for_one(timeout)
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 85, in run_for_one
    self.wait(timeout)
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 37, in wait
    ret = select.select(self.wait_fds, [], [], timeout)
TypeError: exit expected at most 1 argument, got 3

I found that 94a25fc42839f6ac0af027ec0f146901c8256de5 adds some kind of new signal handling. I'm not sure how this was needed. But these lines seem to introduce the problem.

sys.exit is set as handler for SIGTERM and SIGINT. However is seems there was a missed detail. The handler will be called with two arguments (source). @jsangmeister I guess an easy fix would be adding an (anonymus) function that ignores the the args and then calls exit. But I trust you can find the best suitable solution for this ;) .