Skip to content

Implement API endpoint to cancel database triggers #500

@coderabbitai

Description

@coderabbitai

Description

Add a dedicated API endpoint to cancel pending/triggering database triggers and set their expires_at field for cleanup.

Context

The TriggerStatusEnum includes a CANCELLED status, but there is currently no code path that sets triggers to this status or assigns an expires_at timestamp for cancelled triggers. This capability should be implemented via a new API endpoint.

Requirements

  • Implement API endpoint to cancel triggers
  • Add mark_as_cancelled() function (similar to mark_as_failed and mark_as_triggered) to update trigger status to CANCELLED and set expires_at
  • Ensure TTL-based cleanup applies to cancelled triggers (already configured in the index)

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions