mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 04:40:45 +08:00
feat(scheduler): add scheduled jobs with channel-aware delivery
Introduce persisted cron/interval jobs, gateway scheduler loop, worker turns, and admin CRUD/edit UI. Route proactive reminders via the originating chat channel (WhatsApp vs WeChat), harden Weixin outbound with durable queue and PG-compatible polling, and fix chat UI to show each scheduled reminder separately. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
5336f8835f
commit
47813f6a94
45 changed files with 4956 additions and 43 deletions
20
tests/test_schedule_duration_parse.py
Normal file
20
tests/test_schedule_duration_parse.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from runtime.application.gateway.inbound_service import _parse_schedule_duration_seconds
|
||||
|
||||
|
||||
class ScheduleDurationParseTests(unittest.TestCase):
|
||||
def test_minutes(self) -> None:
|
||||
self.assertEqual(_parse_schedule_duration_seconds("5分钟"), 300)
|
||||
|
||||
def test_hours(self) -> None:
|
||||
self.assertEqual(_parse_schedule_duration_seconds("1小时"), 3600)
|
||||
|
||||
def test_seconds(self) -> None:
|
||||
self.assertEqual(_parse_schedule_duration_seconds("120秒"), 120)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue