fix(tanko): adapter fixes, event logging, platform-based deploy.sh
CI / validate (pull_request) Failing after 2s
CI / validate (pull_request) Failing after 2s
- adapter.py: add import asyncio, use Client(site=) for Python 3.13 compat - adapter.py: use asyncio.new_event_loop() in background thread - adapter.py: add print() in _process_event for journald visibility - deploy.sh: refactor to PLATFORM-based maps instead of per-agent duplications - deploy.sh: remove backslash artifacts, deduplicate service/plugin path logic
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# See ADR-005 for @mention detection, ADR-009 for error handling
|
||||
# Full implementation in issue #5.
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
import time
|
||||
import re
|
||||
@@ -36,7 +37,7 @@ class ZulipAdapter:
|
||||
email = self.config['zulip']['email']
|
||||
api_key = self.config['zulip']['api_key']
|
||||
|
||||
self._client = Client(server_url=server_url, email=email, api_key=api_key)
|
||||
self._client = Client(site=server_url.rstrip('/'), email=email, api_key=api_key)
|
||||
self.connected = True
|
||||
logger.info(f"Connected to Zulip: {server_url} as {email}")
|
||||
|
||||
@@ -111,6 +112,9 @@ class ZulipAdapter:
|
||||
}
|
||||
|
||||
def _event_loop(self) -> None:
|
||||
# Create an event loop for this background thread (Python 3.13+)
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
"""Background thread to listen for Zulip events."""
|
||||
try:
|
||||
self._client.call_on_each_message(
|
||||
|
||||
Reference in New Issue
Block a user