bug: telegram_lurker commit_loop asyncio task never executes #231
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Competitor
Kind/Documentation
Kind/Enhancement
Kind/Epic
Kind/Feature
Kind/Security
Kind/Story
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Scope/Core
Scope/Cross-Plugin
Scope/Plugin-System
Scope/Single-Plugin
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ultanio/cobot#231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
_commit_loopbackground task in the telegram_lurker plugin never fires. Messages are written to JSONL files correctly, but the periodic git commit+push never happens.Analysis
In
start(), the plugin creates an asyncio task:However,
start()is called duringinit_plugins()insideasyncio.run(plugin_system.init_plugins(...))incli.py:153. Afterinit_pluginsreturns, thatasyncio.run()completes and the event loop ends. The commit_task is created in that event loop but never gets a chance to execute because the loop finishes.The main polling loop in the
loopplugin likely creates its own event loop context, so the commit_task fromstart()is orphaned.Evidence
journalctlshows no commit-related output (neither success nor error)git statusconfirms untracked changes exist_write_jsonlworks correctly (synchronous, called from_on_message)_git_commitworks correctly when called manuallyExpected Behavior
The commit_loop should fire every
commit_intervalseconds (default 60), staging all changes and committing.Suggested Fix
Either:
loop.on_tick)register_periodic_task()API for plugins that need background workWorkaround
External systemd timer (
lurker-commit.timer) runsgit add -A && git commit && git pushhourly. Documented and deployed on olymp.Related