feat(shell-sync): run_daemon() part 2/3
This commit is contained in:
1 parent
4c9912dd79
commit
26c5434ba4
1 file changed
+12
@@ -373,3 +373,15 @@ run_daemon() {
|
||||
start_heartbeat
|
||||
trap 'kill "${HEARTBEAT_PID:-}" "${CRON_PID:-}" 2>/dev/null || true' EXIT
|
||||
|
||||
if [ -n "$SYNC_CRON" ]; then
|
||||
run_cron_scheduler
|
||||
return
|
||||
fi
|
||||
|
||||
while true; do
|
||||
sync_all || true
|
||||
log "Sleeping ${SYNC_INTERVAL}s before the next sync cycle"
|
||||
sleep "$SYNC_INTERVAL"
|
||||
done
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user