refactor: event-driven tuning\n\n- ingest: switch to path unit (inotify) for immediate trigger\n- auto-review: every 30min + ExecStartPost after ingest\n- health-check: every 30min\n- import-context-buffer: every 15min\n\nRefs: #25
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
[Unit]
|
||||
Description=Run auto assign review daily at 14:30
|
||||
Description=Run auto assign review every 30 minutes
|
||||
PartOf=openclaw-secondbrain.target
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 14:30:00
|
||||
OnUnitActiveSec=30min
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[Unit]
|
||||
Description=Run health check at 02:00 and 14:00 daily
|
||||
Description=Run health check every 30 minutes
|
||||
PartOf=openclaw-secondbrain.target
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 02,14:00:00
|
||||
OnUnitActiveSec=30min
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[Unit]
|
||||
Description=Import Context Buffer every 4 hours
|
||||
Description=Import Context Buffer every 15 minutes
|
||||
PartOf=openclaw-secondbrain.target
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 02,06,10,14,18,22:00:00
|
||||
OnUnitActiveSec=15min
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
|
||||
10
systemd/openclaw-secondbrain-ingest-memory.path
Normal file
10
systemd/openclaw-secondbrain-ingest-memory.path
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Watch memory/ directory for changes to trigger ingest
|
||||
PartOf=openclaw-secondbrain.target
|
||||
|
||||
[Path]
|
||||
PathModified=/root/.openclaw/workspace/memory
|
||||
DirectoryNotEmpty=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -6,3 +6,5 @@ OnFailure=openclaw-secondbrain-notify@%n.service
|
||||
Type=oneshot
|
||||
WorkingDirectory=/root/.openclaw/workspace
|
||||
ExecStart=/bin/bash -lc 'flock -n /tmp/%n.lock /usr/bin/python3 /root/.openclaw/workspace/openclaw_cron_wrapper.py ingest_memory'
|
||||
# Trigger auto-review after each ingest
|
||||
ExecStartPost=/bin/systemctl start openclaw-secondbrain-auto-review.service
|
||||
|
||||
Reference in New Issue
Block a user