Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Trust and Identity Incubator
alternate-mdx
Commits
d963b10c
Commit
d963b10c
authored
Jan 27, 2022
by
Martin van Es
Browse files
WIP
parent
375a67cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.py
View file @
d963b10c
...
...
@@ -123,8 +123,11 @@ class Resource:
class
EventProcessor
(
pyinotify
.
ProcessEvent
):
def
__init__
(
self
,
server
):
self
.
server
=
server
def
process_IN_CLOSE_WRITE
(
self
,
event
):
server
.
process
(
event
.
path
)
self
.
server
.
process
(
event
.
path
)
class
Server
:
...
...
@@ -132,7 +135,7 @@ class Server:
def
__init__
(
self
):
self
.
watch_manager
=
pyinotify
.
WatchManager
()
self
.
event_notifier
=
pyinotify
.
ThreadedNotifier
(
self
.
watch_manager
,
EventProcessor
())
self
.
event_notifier
=
pyinotify
.
ThreadedNotifier
(
self
.
watch_manager
,
EventProcessor
(
self
))
self
.
event_notifier
.
start
()
def
add_watch
(
self
,
domain
,
location
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment