Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions dramatiq/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
import watchdog.events
import watchdog.observers.polling

try:
import watchdog_gevent

EVENTED_OBSERVER = watchdog_gevent.Observer
except ImportError:
EVENTED_OBSERVER = watchdog.observers.Observer


def setup_file_watcher(path, use_polling=False, include_patterns=None, exclude_patterns=None):
"""Sets up a background thread that watches for source changes and
Expand All @@ -23,7 +16,7 @@ def setup_file_watcher(path, use_polling=False, include_patterns=None, exclude_p
if use_polling:
observer_class = watchdog.observers.polling.PollingObserver
else:
observer_class = EVENTED_OBSERVER
observer_class = watchdog.observers.Observer

if include_patterns is None:
include_patterns = ["*.py"]
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,5 @@ module = [
"pylibmc",
"redis",
"watchdog",
"watchdog_gevent",
]
ignore_missing_imports = true
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def rel(*xs):

extra_dependencies = {
"gevent": [
"gevent>=1.1",
"gevent>=25.9.1",
],
"memcached": [
"pylibmc>=1.5,<2.0",
Expand All @@ -58,8 +58,7 @@ def rel(*xs):
"redis>=4.0,<7.0",
],
"watch": [
"watchdog>=4.0",
"watchdog_gevent>=0.2",
"watchdog>=6.0.0",
],
}

Expand Down