fix: preserve signed terminal nonstarts across repeated and restarted sync
Rust development slice / linux (push) Failing after 6s
Rust development slice / linux (push) Failing after 6s
This commit is contained in:
@@ -758,7 +758,13 @@ fn attempts(db: &Connection, ledger: &Connection, binding: &Binding) -> Result<V
|
||||
|r| Ok((r.get(0)?, r.get(1)?, r.get(2)?, r.get(3)?)),
|
||||
)
|
||||
.optional()?;
|
||||
let mut consumption = if grant_id.is_empty() && state == "accepted" {
|
||||
// A signed definitive nonstart can make an accepted no-grant row
|
||||
// terminal without a JobResult. Preserve that fact on the next Sync;
|
||||
// requesting/running/unknown still cannot claim non-consumption. An
|
||||
// actual durable consumption row below always overrides this label.
|
||||
let mut consumption = if grant_id.is_empty()
|
||||
&& matches!(state.as_str(), "accepted" | "expired" | "cancelled")
|
||||
{
|
||||
"unconsumed"
|
||||
} else {
|
||||
"uncertain"
|
||||
|
||||
Reference in New Issue
Block a user