Skip to content

feat: add retry logic#1

Open
emilioSp wants to merge 4 commits intomainfrom
feat/retry-logic
Open

feat: add retry logic#1
emilioSp wants to merge 4 commits intomainfrom
feat/retry-logic

Conversation

@emilioSp
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds retry/failure handling for queue tasks by extending the task schema and updating the consumer to persist execution outcomes and retry metadata.

Changes:

  • Extend Task typing to include retry metadata and a failed status.
  • Update the consumer to record done/failed outcomes and re-queue tasks while under the retry limit.
  • Add a migration to introduce retry-related columns and extend the Postgres t_status enum.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
src/types.ts Updates Task shape to include retry fields, timestamps, and failed status.
src/consumer.ts Implements try/catch retry flow and persists state transitions to the DB.
migrations/20260128113327_add_retry_logic.ts Adds retry columns and extends the t_status enum with failed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI commented Jan 28, 2026

@emilioSp I've opened a new pull request, #2, to work on those changes. Once the pull request is ready, I'll request review from you.

emilioSp and others added 3 commits January 28, 2026 16:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan

* Rename max_retries to max_attempts for clarity

Co-authored-by: emilioSp <22614105+emilioSp@users.noreply.github.com>

* Clarify log messages and fix migration down function

Co-authored-by: emilioSp <22614105+emilioSp@users.noreply.github.com>

* Improve migration down function comment

Co-authored-by: emilioSp <22614105+emilioSp@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emilioSp <22614105+emilioSp@users.noreply.github.com>
Co-authored-by: Emilio Spatola <emiliosp.me@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants