divviup / divviup/divviup-api

Fix Axum graceful shutdown

Open
#2,262 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
10
Forks
5
Avg merge
2h 41m
Merged PRs (30d)
66

Description

Without this, we lose the waiting part of graceful shutdown, and we might shut down the process while a queue job is still in flight. We could replace CloneCounterObserver with tokio_util::task::TaskTracker I think, but we'd have to change how we structure our work into Tokio tasks, and maybe replace our existing use of JoinSet. This would probably be a good thing to punt to a dedicated follow-up PR.

Originally posted by @divergentdave in https://github.com/divviup/divviup-api/pull/2251#discussion_r3229896193

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the current graceful-shutdown flow and how CloneCounterObserver, JoinSet, and Tokio tasks track queue jobs. Evaluate the suggested TaskTracker approach and the required task-structure changes. Done means shutdown waits for in-flight queue jobs before the process exits.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.