A runner busy with its only job stays online d94449e42718
Claims were what marked a runner seen, so a full runner, which claims nothing, showed offline while it ran. Its log batches and finish call now mark it seen too. closes #78
- Author
- Andy McCall @andymccall <[email protected]>
- When
- · 2026-10-04 03:16 UTC
- Signature
- ✔ signed by Andy McCall
- Hash
d94449e42718409b41ab98335c6641b2b4429332e8a1cab535e76467509986b4- Depends on
- 42fa95540468 745d225de344 b6b7e4cf6b24
- Depended on by
- nothing yet
- In bookmarks
- api-unknown-fields cancel-landed-runs clear-waiting close-proposal-140 diffusion-pin-bookmark draft-ready image-check job-waits main oh-comment-body-file proposal-list-fast run-one-job wiki-says-so
- In tags
- v0.4.0 v0.4.1 v0.4.2 v0.5.0 v0.5.1 v0.5.2 v0.6.0 v0.6.1 v0.7.0 v0.8.0 v0.9.0 v0.9.1 v0.9.11 v0.9.15 v0.9.16 v0.9.19 v0.9.2 v0.9.20 v0.9.21 v0.9.22 v0.9.23 v0.9.24 v0.9.3 v0.9.4 v0.9.5 v0.9.6 v0.9.7 v0.9.8 v0.9.9
- Edits
- 4 atoms, 0 tree operations, 1 file
Browse the tree at this change
modified crates/hub/src/flow.rs +5 −1
| … | 590 unchanged lines |
||
| 591 | 591 | Path(id): Path<i64>, |
|
| 592 | 592 | Json(mut batch): Json<LogBatch>, |
|
| 593 | 593 | ) -> Result<StatusCode, ApiError> { |
|
| 594 | - | runner_auth(&app, &headers).await?; |
|
| 594 | + | let me = runner_auth(&app, &headers).await?; |
|
| 595 | 595 | let job = running_job(&app, id).await?; |
|
| 596 | + | // A runner busy with its only job claims nothing, so its log and |
|
| 597 | + | // finish calls are what keep it online (oxygenhub#78). |
|
| 598 | + | db::runners::seen(&app.db, me.id, None, None).await?; |
|
| 596 | 599 | // An empty batch asks only whether the job still runs: a cancelled |
|
| 597 | 600 | // one answers 409 and its runner stops it (oxygenflow#32). |
|
| 598 | 601 | if batch.records.is_empty() { |
|
| … | 62 unchanged lines |
||
| 661 | 664 | ) -> Result<StatusCode, ApiError> { |
|
| 662 | 665 | let me = runner_auth(&app, &headers).await?; |
|
| 663 | 666 | let job = running_job(&app, id).await?; |
|
| 667 | + | db::runners::seen(&app.db, me.id, None, None).await?; |
|
| 664 | 668 | let status = match (f.exit_code, &f.error) { |
|
| 665 | 669 | (Some(0), None) => "passed", |
|
| 666 | 670 | (Some(_), _) => "failed", |
|
| … | 307 unchanged lines |