Skip to content

Gunicorn[UVLoop]WebWorker doesn’t call worker_int and worker_abort callback #1202

Closed
@hynek

Description

Long story short

gunicorn defines two callbacks that are called after receiving SIGINT/SIGQUIT & SIGABRT. Gunicorn[UVLoop]WebWorker call them.

Expected behaviour

The callbacks get called.

Actual behaviour

The callbacks don't get called.

Proposed fix

Call the callbacks like gunicorn.workers.base.Worker does:

    def handle_quit(self, sig, frame):
        self.alive = False
        # worker_int callback
        self.cfg.worker_int(self)
        time.sleep(0.1)
        sys.exit(0)

    def handle_abort(self, sig, frame):
        self.alive = False
        self.cfg.worker_abort(self)
        sys.exit(1)

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions