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

Add polling #12

Merged
merged 12 commits into from
Jan 10, 2022
Merged

Add polling #12

merged 12 commits into from
Jan 10, 2022

Conversation

Cian911
Copy link
Owner

@Cian911 Cian911 commented Jan 6, 2022

This PR adds a queue/polling system.

I encountered a bug wherein downloading files would trigger a CREATE event initially, but the operation would not have completed. This lead to the file being moved to the consumer destination, but being invalid.

This PR introduces a queue/polling system. Events will be added to a queue, wherein a poller will check every x number of seconds when the file was last modified. If the file was modified within the last x number of seconds, we will continue polling, otherwise, we can assume operation has completed, and the file is valid.

This does not obviously cover all scenarios, for example, you might be downloading a file and halfway through you may loose internet connectivity. In this instance, the file will be moved, and may very well be invalid. That being said, I believe this change will greatly improve switchboard compared to how it currently stands.

@Cian911 Cian911 marked this pull request as ready for review January 9, 2022 23:36
@Cian911 Cian911 added bug Something isn't working enhancement New feature or request labels Jan 9, 2022
@Cian911 Cian911 changed the title WIP: Add polling Add polling Jan 9, 2022
@Cian911
Copy link
Owner Author

Cian911 commented Jan 9, 2022

Add more tests and improve test coverage.

@Cian911 Cian911 self-assigned this Jan 9, 2022
@Cian911
Copy link
Owner Author

Cian911 commented Jan 9, 2022

Squash commits

@Cian911
Copy link
Owner Author

Cian911 commented Jan 9, 2022

Update readme docs & site docs

@Cian911 Cian911 merged commit 9703ddc into master Jan 10, 2022
@Cian911 Cian911 deleted the swb/add-queue-polling branch January 10, 2022 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant