Delegate bridge interruption
This commit is contained in:
parent
a6965012a6
commit
a682f7acd7
6 changed files with 46 additions and 48 deletions
|
|
@ -9,6 +9,13 @@ pub fn interrupt_coordinator_job(
|
|||
state: &EpiphanyThreadState,
|
||||
request: EpiphanyJobInterruptRequest,
|
||||
) -> Result<EpiphanyJobInterruptResult> {
|
||||
if let Some(persisted) = read_coordinator_state(store)?
|
||||
&& persisted != *state
|
||||
{
|
||||
return Err(anyhow!(
|
||||
"authoritative coordinator state changed before interrupt commit"
|
||||
));
|
||||
}
|
||||
if request.binding_id.trim().is_empty() {
|
||||
return Err(anyhow!(
|
||||
"epiphany job interrupt binding_id must be non-empty"
|
||||
|
|
|
|||
Reference in a new issue