-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Summary
There are several runtime/library code paths that can panic (assert!, expect, and implicit panics), which is risky for production background workers.
Evidence
ZonedSchedule::newusesassert!on IANA name:src/scheduler.rs:63- Worker interval conversion uses
expect:src/worker.rs:835,src/worker.rs:839 enqueue_many_with_chunk_sizecan panic whenchunk_size == 0(viachunks(0)):src/queue.rs:679
Why this matters
Unexpected panics can crash long-running workers/schedulers and cause avoidable downtime.
Proposed direction
- Replace panic paths with typed errors.
- Validate user-provided parameters (
chunk_size > 0) early. - Keep library behavior failure-typed rather than aborting tasks.
Acceptance criteria
- Above paths return structured errors and are covered with regression tests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels