Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added event_time attr to the FileSystemEvent for more accurate timing… #748

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xzava
Copy link

@xzava xzava commented Jan 19, 2021

Due to blocking their is a delay between when FileSystemEvent obj is created and when the FileSystemEventHandler processed the event. Is means you could only collect the time the event was handled, rather than the time it the event was created.

Events are processed one by one so any blocking on the FileSystemEventHandler affects the time.

So I added 'event_time' property to FileSystemEvent base class to accurately log the time the event was created.

>>> event
<FileModifiedEvent: event_type=modified, src_path='./watch2.py', is_directory=False, event_time=2021-01-19T12:51:29.821598>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant