Skip to content

feat(cron): support comma-separated multi-target deliver values - #11601

Closed
LLQWQ wants to merge 1 commit into
NousResearch:mainfrom
LLQWQ:fix/cron-comma-separated-multi-target-deliver
Closed

feat(cron): support comma-separated multi-target deliver values#11601
LLQWQ wants to merge 1 commit into
NousResearch:mainfrom
LLQWQ:fix/cron-comma-separated-multi-target-deliver

Conversation

@LLQWQ

@LLQWQ LLQWQ commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Allow cron jobs to deliver output to multiple platforms simultaneously by specifying comma-separated deliver values.

Motivation

Previously extracted from #10091 (weixin live adapter PR) but deferred to Batch 4 per #11571. This is a standalone extraction of just the cron multi-target delivery feature.

Usage Examples

  • deliver: feishu,weixin — deliver to both Feishu and Weixin home channels
  • deliver: telegram:channel1,discord:channel2 — deliver to specific channels on multiple platforms
  • deliver: origin,weixin — deliver to origin chat AND Weixin home channel

Changes

  • Split _resolve_delivery_target into _resolve_single_delivery_target (handles one platform) and _resolve_delivery_targets (parses comma-separated list)
  • _resolve_delivery_target remains as backward-compatible wrapper
  • _deliver_result now loops over all resolved targets, collecting errors rather than failing fast
  • Duplicate targets are deduplicated by (platform, chat_id, thread_id)

Testing

  • tests/cron/test_scheduler.py delivery tests: 26 passed

Closes #11602

Allow cron jobs to deliver output to multiple platforms simultaneously
by specifying comma-separated deliver values, e.g.:
- "feishu,weixin"
- "telegram:channel1, discord:channel2"
- "origin, weixin"

Changes:
- Split _resolve_delivery_target into _resolve_single_delivery_target
  (handles one platform) and _resolve_delivery_targets (parses comma list).
- _resolve_delivery_target remains as backward-compatible wrapper.
- _deliver_result now loops over all resolved targets, collecting errors
  rather than failing fast on the first one.
- Duplicate targets are deduplicated by (platform, chat_id, thread_id).
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management labels Apr 24, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Note: #11594 (Batch-4 salvage) is already merged and included multi-target deliver. This PR may be redundant — verify whether the feature already landed via #11594.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution! This feature has already landed on main via a prior merge, so this PR is redundant.

Automated hermes-sweeper review.

  • _resolve_single_delivery_target (line 150), _resolve_delivery_targets with comma-split + deduplication (line 234), and the multi-target loop in _deliver_result (line 311) are all present in cron/scheduler.py on current main.
  • The implementation was introduced by commit 5ca52bae5 (fix(gateway/weixin): split poll/send sessions, reuse live adapter for cron & send_message, 2026-04-16) — one day before this PR was filed.
  • @alt-glitch also noted that PR fix(cron+weixin): Batch-4 salvage — origin fallback dict + Weixin session split + multi-target deliver #11594 (Batch-4 salvage) already included this feature.

The feature you implemented matches what is on main in both structure and behavior. No further action needed here.

@teknium1 teknium1 closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cron): support comma-separated multi-target deliver values

3 participants