mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
parent
c58560b895
commit
fc7c15abbd
@ -53,12 +53,14 @@ class Reloader(threading.Thread):
|
|||||||
self._callback(filename)
|
self._callback(filename)
|
||||||
time.sleep(self._interval)
|
time.sleep(self._interval)
|
||||||
|
|
||||||
try:
|
has_inotify = False
|
||||||
from inotify.adapters import Inotify
|
if sys.platform.startswith('linux'):
|
||||||
import inotify.constants
|
try:
|
||||||
has_inotify = True
|
from inotify.adapters import Inotify
|
||||||
except ImportError:
|
import inotify.constants
|
||||||
has_inotify = False
|
has_inotify = True
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class InotifyReloader():
|
class InotifyReloader():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user