mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 13:07:56 +00:00
Move these Eliot events somewhere reusable
This commit is contained in:
parent
9ed019f8de
commit
fcb08b5a3a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user