You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Menjanahary
menjaraz
Accountant by education, Chess fan & Beekeeper by passion.
Everything Strong Formal Logic enthusiast and Opensource Contributor.
The seed mechanism loads a realistic pharmaceutical supply chain scenario into a running EPCIS 2.0 app instance. It is designed for local development and manual exploration — not for test suites (tests create their own data).
Quick start
make docker-up # start the full stack (DB + app)
make seed # load seed data (safe to run multiple times)
Rust asynchronous retry logic using tokio_retry with ExponentialBackoff, jitter, and conditional error handling (RetryIf).
Async Retry Logic in Rust with tokio-retry
This Gist demonstrates a production-ready pattern for executing asynchronous operations with exponential backoff, jitter, and conditional error handling using the tokio-retry crate.
It specifically showcases how to handle shared state safely across retry boundaries using thread-safe atomics.
🚀 Key Features Demonstrated
Exponential Backoff with Jitter: Automatically increases delays between retries to prevent overwhelming downstream services, adding randomness (jitter) to avoid the thundering herd problem.
Conditional Retries (RetryIf): Inspects the returned error to differentiate between transient failures (which should be retried) and fatal errors (which should abort immediately).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OEIS A014445 - Even Fibonacci numbers; or, Fibonacci(3*n).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters