#2829 closed defect (fixed)
make magic-folder (downloader) polling interval configurable
Reported by: | meejah | Owned by: | meejah |
---|---|---|---|
Priority: | normal | Milestone: | 1.12.0 |
Component: | code-frontend-magic-folder | Version: | 1.11.0 |
Keywords: | Cc: | meejah | |
Launchpad Bug: |
Description
It's not currently possible to configure the polling interval for the magic-folder downloader.
Additionally, we should think about what a good default is (3 seconds was used during development, but that's way too short).
We also should document this behavior and say something about how to choose a default (e.g. maybe a *rough* estimate of how much traffic it means).
Change History (9)
comment:1 Changed at 2016-09-13T20:06:15Z by warner
- Owner changed from daira to meejah
comment:2 Changed at 2016-10-04T16:57:05Z by meejah
comment:3 Changed at 2016-10-05T11:52:50Z by dawuud
I checked and currently MagicFolder? defaults to a 1 second polling interval.
Here's I've changed it to 5 seconds default and made it configureable via a magic folder polling interval config file option: https://github.com/david415/tahoe-lafs/tree/2829.magic_folder_polling_interval.0 https://github.com/david415/tahoe-lafs/commit/63e52c276ba3d2e13dd55b74d2c88e4456b168f4
comment:4 Changed at 2016-10-06T13:02:35Z by dawuud
upon looking at the code more closely i don't understand why we have two delay variables in the queue mixin:
- turn delay
- scan interval
the scan interval only controls how often when_queue_is_empty is called which is only used by the Downloader which performs a remote collective dir scan every scan interval. having the scan interval and the turn delay be different for the Downloader does nothing special.
the uploader doesn't even use when_queue_is_empty. it's a no-op.
can we get rid of scan_interval? I certainly do not like shadowing variable in mixins and in the inheriting class.
comment:5 Changed at 2016-10-06T14:21:01Z by dawuud
i added more commits to that dev branch experimenting with removing scan_interval. it did not work out so well. the unit tests... many of them fail. not sure why.
comment:6 Changed at 2016-10-25T00:55:18Z by meejah
comment:7 Changed at 2016-10-26T21:33:05Z by warner
Landed in [233d0e2].
comment:8 Changed at 2016-10-31T21:14:55Z by meejah
- Resolution set to fixed
- Status changed from new to closed
comment:9 Changed at 2016-10-31T21:15:08Z by meejah
Closed as fixed since the PR was merged.
For a first cut, at least making "a" config-option is a must for 0.1.12
Longer term, it might be good to have other ways of scheduling magic-folder syncs. (e.g. even "only when told to" or schedule times of low-freq/high-freq, etc).