`write_dm_with_retry` and `write_room_message_with_retry` are identical retry loops
Open
Beginner friendly
medium
refactoring
- Dominant language
- Rust
- Stars
- 0
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
These two functions in `persistance_actor/handlers.rs` share the exact same structure: clone client, loop with attempts, sleep with linear backoff, return last error. The only difference is which gRPC method they call.
hint: generics, Both callers become one-liners.
Contributor guide
Research direction
Start in persistance_actor/handlers.rs by reading write_dm_with_retry and write_room_message_with_retry, then inspect their callers. Compare the retry attempts, linear backoff, client cloning, and error handling; done means the shared generic retry behavior is preserved while both callers become one-liners.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, rust
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100