mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 07:20:44 +08:00
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>
20 lines
579 B
Python
20 lines
579 B
Python
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()
|