[v4] Don’t allowed canceled delayed runs to be put into the queue#1981
[v4] Don’t allowed canceled delayed runs to be put into the queue#1981matt-aitken merged 1 commit intomainfrom
Conversation
|
WalkthroughThis change enhances the run engine's handling of delayed runs by integrating the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant RunEngine
participant RunAttemptSystem
participant DelayedRunSystem
participant Worker
User->>RunEngine: Cancel delayed run
RunEngine->>RunAttemptSystem: cancelRun(runId)
RunAttemptSystem->>Prisma: Fetch run (includes delayUntil)
alt Run is in initial state and delayed
RunAttemptSystem->>DelayedRunSystem: preventDelayedRunFromBeingEnqueued(runId)
DelayedRunSystem->>Worker: ack(jobId)
end
RunAttemptSystem-->>RunEngine: Run cancelled
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🧰 Additional context used🧬 Code Graph Analysis (3)internal-packages/run-engine/src/engine/statuses.ts (1)
internal-packages/run-engine/src/engine/systems/delayedRunSystem.ts (2)
internal-packages/run-engine/src/engine/systems/runAttemptSystem.ts (3)
⏰ Context from checks skipped due to timeout of 90000ms (7)
🔇 Additional comments (11)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
If you canceled a delayed run (before the delay date) then it was "Canceled". But then it got queued and executed as normal, as if you hadn't canceled it in the first place…
Created a RunEngine test to reproduce the issue. Then fixed it.
Summary by CodeRabbit
New Features
Bug Fixes
Tests