Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
424483a1
Commit
424483a1
authored
Oct 10, 2014
by
Benjamin Fischer
Browse files
Include mtime in watch events.
parent
55e773f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
vispa/remote/filesystem.py
View file @
424483a1
...
...
@@ -477,6 +477,10 @@ class FileSystem(object):
with
self
.
_monitor_lock
:
# inform all listener
if
os
.
path
.
exists
(
event
.
watch
.
path
):
mtime
=
os
.
path
.
getmtime
(
event
.
watch
.
path
)
else
:
mtime
=
-
1
for
combined_id
in
event
.
watch
.
listener
:
vispa
.
remote
.
send_topic
(
"extension.%s.socket.watch"
%
combined_id
[
1
],
...
...
@@ -484,11 +488,12 @@ class FileSystem(object):
data
=
{
"path"
:
event
.
watch
.
path
,
"action_name"
:
event
.
action_name
,
"watch_id"
:
combined_id
[
2
]
"watch_id"
:
combined_id
[
2
],
"mtime"
:
mtime
})
# cleanup yourself
if
event
.
action_name
==
'delete self'
:
if
mtime
==
-
1
:
for
combined_id
in
event
.
watch
.
listener
:
del
self
.
_monitor_listener
[
combined_id
]
self
.
_check_watch
(
event
.
watch
)
...
...
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