From fcb08b5a3a1fed287a7ab9e2baf04fc471141a7c Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Tue, 12 Mar 2019 15:00:15 -0400 Subject: [PATCH] Move these Eliot events somewhere reusable --- src/allmydata/watchdog/inotify.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/allmydata/watchdog/inotify.py b/src/allmydata/watchdog/inotify.py index 9b8f690e7..68a121a60 100644 --- a/src/allmydata/watchdog/inotify.py +++ b/src/allmydata/watchdog/inotify.py @@ -49,7 +49,8 @@ from allmydata.util.fake_inotify import humanReadableMask, \ _FLAG_TO_HUMAN from ..util.eliotutil import ( - INOTIFY_EVENTS, + MAYBE_NOTIFY, + CALLBACK, validateInstanceOf, ) @@ -68,13 +69,6 @@ _PATH = Field.for_types( u"The path an inotify event concerns.", ) -MAYBE_NOTIFY = ActionType( - u"watchdog:inotify:maybe-notify", - [], - [], - u"An inotify event is being considered for dispatch to an application handler.", -) - _EVENT = Field( u"event", lambda e: e.__class__.__name__, @@ -89,13 +83,6 @@ ANY_INOTIFY_EVENT = ActionType( u"An inotify event is being dispatched.", ) -CALLBACK = ActionType( - u"watchdog:inotify:callback", - [INOTIFY_EVENTS], - [], - u"An inotify event is being dispatched to an application callback." -) - class INotifyEventHandler(FileSystemEventHandler): def __init__(self, path, mask, callbacks, pending_delay): FileSystemEventHandler.__init__(self)