mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
The signature of __init__ on the "fall through" InotifyReloader
was missing the extra_files paramater, so specifying the inotify
reload engine on the command line when one did not have inotify
installed would, instead of a nice message about needed inotify
installed would result in the following traceback:
```
[2020-10-30 00:55:43 +0000] [7] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 132, in init_process
self.reloader = reloader_cls(extra_files=self.cfg.reload_extra_files,
TypeError: __init__() got an unexpected keyword argument 'extra_files'
```
I didn't see an easy way to writing a test for this, but would be
happy to take pointers.
This commit is contained in:
parent
548d5828da
commit
da3b89b765
@ -118,7 +118,7 @@ if has_inotify:
|
||||
else:
|
||||
|
||||
class InotifyReloader(object):
|
||||
def __init__(self, callback=None):
|
||||
def __init__(self, extra_files=None, callback=None):
|
||||
raise ImportError('You must have the inotify module installed to '
|
||||
'use the inotify reloader')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user