1
0
Fork 0
mirror of https://codeberg.org/Reuh/feather.git synced 2025-10-27 10:09:32 +00:00

fix: change default daemon delays

This commit is contained in:
Étienne Fildadut 2025-10-13 17:29:04 +02:00
parent 0cf3e4dfc2
commit 72681be275
2 changed files with 14 additions and 9 deletions

View file

@ -221,8 +221,14 @@ class FeatherApp:
async def daemon(self):
"""Start the synchronization daemon"""
config = self.config
if config.daemon_watch_files:
print(
f"Started in daemon mode; changes will be downloaded from the server every {self.config.daemon_sync_down_every}s and uploaded every {self.config.daemon_sync_up_every}s"
f"Started in daemon mode; changes will be downloaded from the server every {config.daemon_sync_down_every_when_used} to {config.daemon_sync_down_every} seconds and uploaded every {config.daemon_sync_up_every_when_used} to {config.daemon_sync_up_every} seconds"
)
else:
print(
f"Started in daemon mode; changes will be downloaded from the server every {config.daemon_sync_down_every}s and uploaded every {config.daemon_sync_up_every} seconds"
)
async with asyncio.TaskGroup() as tg:
stop_sleep_up_event, stop_sleep_down_event = Event(), Event()
@ -230,7 +236,7 @@ class FeatherApp:
tg.create_task(self.daemon_sync_up_loop(stop_sleep_up_event)),
tg.create_task(self.daemon_sync_down_loop(stop_sleep_down_event)),
]
if self.config.daemon_watch_files:
if config.daemon_watch_files:
tasks.append(
tg.create_task(
self.daemon_watch_loop(

View file

@ -137,18 +137,17 @@ format = "%Y-%m-%d %H:%M"
[daemon]
# When running in daemon mode, Feather will download changes from the server (new articles, articles read state) at least every <sync_down_every> seconds.
# Can be set through the environment variable DAEMON_SYNC_DOWN_EVERY.
sync_down_every = 900
sync_down_every = 1800
# When running in daemon mode, Feather will upload local changes to the server (read articles) at least every <sync_up_every> seconds.
# Can be set through the environment variable DAEMON_SYNC_UP_EVERY.
sync_up_every = 60
sync_up_every = 300
# If true, enable the file watcher.
# When enabled, Feather will watch for file changes in the reader directory; when a change is detected, the time before the next up and down synchronization is reduced to <sync_up_every_when_used> and <sync_down_every_when_used>.
# This can be used to reduce network requests to the server while Feather is not in use.
# When enabled, Feather will watch for file changes in the reader directory; when a change is detected, the time before the next up and down synchronization is reduced to <sync_up_every_when_used> and <sync_down_every_when_used>, thus increasing synchronization frequency while Feather is in use.
# Can be set through the environment variable DAEMON_WATCH_FILES.
watch_files = true
# If the file watcher is enabled and activity is detected, Feather will wait <sync_down_every_when_used> instead of <sync_down_every> seconds before the next down synchronization.
# Can be set through the environment variable DAEMON_SYNC_DOWN_EVERY_WHEN_USED.
sync_down_every_when_used = 60
sync_down_every_when_used = 300
# If the file watcher is enabled and activity is detected, Feather will wait <sync_up_every_when_used> instead of <sync_up_every> seconds before the next up synchronization.
# Can be set through the environment variable DAEMON_SYNC_UP_EVERY_WHEN_USED.
sync_up_every_when_used = 2