feat: if owner

This commit is contained in:
2026-01-12 12:47:29 +01:00
parent 681f1f3932
commit 7a19b78692

View File

@@ -28,7 +28,7 @@ impl<T: Specification> BackingStore<T> {
&self, &self,
worker_id: &WorkerId, worker_id: &WorkerId,
) -> anyhow::Result<Vec<ManifestState<T>>> { ) -> anyhow::Result<Vec<ManifestState<T>>> {
let now = jiff::Timestamp::now().checked_sub(1.second())?; let now = jiff::Timestamp::now().checked_sub(10.second())?;
let manifests = self let manifests = self
.manifests .manifests
.read() .read()
@@ -36,7 +36,7 @@ impl<T: Specification> BackingStore<T> {
.iter() .iter()
.filter(|m| match &m.lease { .filter(|m| match &m.lease {
Some(lease) if lease.last_seen < now => true, Some(lease) if lease.last_seen < now => true,
Some(lease) if &lease.owner == worker_id => true, Some(lease) if &lease.owner == worker_id && lease.last_seen > now => true,
Some(_lease) => false, Some(_lease) => false,
None => true, None => true,
}) })