Skip to content

Commit

Permalink
Feat: Retry endpoint added (#198)
Browse files Browse the repository at this point in the history
* feat: added retry endpoint for failed jobs

* refactor: verify job will allow verification of the job with timeout status

* chore: changelog updated

* chore: comments updated

* refactor: business logic of retry jobs moved to jobs/mod.rs

* test: test added for retry job endpoint when status not failed

* chore: comments resolved regarding docs updatation

* docs: udpated for the routes module

* chore: comment updated in the verify job

* chore: removed redundant comments

* chore: tests for retry endpoint separated

* refactor: adding retry jobs directly to the queue now

* chore: removed redundant comment

* refactor: process and verify endpoint adds job to the queue now

* refactor: test updated for routes

* chore: comment resolved

* refactor: testing messages of routes as well

---------

Co-authored-by: mohiiit <[email protected]>
  • Loading branch information
Mohiiit and mohiiit authored Jan 17, 2025
1 parent 3ec2873 commit 9000464
Show file tree
Hide file tree
Showing 11 changed files with 1,034 additions and 127 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Added

- Added retry job endpoint for failed jobs
- readme: setup instructions added
- Added : Grafana dashboard
- tests: http_client tests added
Expand Down Expand Up @@ -50,6 +51,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Changed

- verify_job now handles VerificationTimeout status
- refactor: expect removed and added error wraps
- refactor: Readme and .env.example
- refactor: http_mock version updated
Expand Down
2 changes: 2 additions & 0 deletions crates/orchestrator/src/jobs/constants.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
pub const JOB_PROCESS_ATTEMPT_METADATA_KEY: &str = "process_attempt_no";
pub const JOB_PROCESS_RETRY_ATTEMPT_METADATA_KEY: &str = "process_retry_attempt_no";
pub const JOB_VERIFICATION_ATTEMPT_METADATA_KEY: &str = "verification_attempt_no";
pub const JOB_VERIFICATION_RETRY_ATTEMPT_METADATA_KEY: &str = "verification_retry_attempt_no";
pub const JOB_METADATA_STATE_UPDATE_BLOCKS_TO_SETTLE_KEY: &str = "blocks_number_to_settle";
pub const JOB_METADATA_STATE_UPDATE_FETCH_FROM_TESTS: &str = "fetch_from_test_data";
pub const JOB_METADATA_STATE_UPDATE_ATTEMPT_PREFIX: &str = "attempt_tx_hashes_";
Expand Down
Loading

0 comments on commit 9000464

Please sign in to comment.