Skip to content

Commit

Permalink
Get exposure ID from ingestion instead of file path.
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed Mar 25, 2024
1 parent 4f53eb3 commit 0481bc8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions python/activator/activator.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from .raw import (
get_prefix_from_snap,
is_path_consistent,
get_exp_id_from_oid,
get_group_id_from_oid,
)
from .visit import FannedOutVisit
Expand Down Expand Up @@ -307,9 +306,8 @@ def next_visit_handler() -> Tuple[str, int]:
expected_visit.detector,
)
if oid:
exp_id = get_exp_id_from_oid(oid)
_log.debug("Found exposure %r already present", exp_id)
mwi.ingest_image(oid)
_log.debug("Found object %s already present", oid)
exp_id = mwi.ingest_image(oid)
expid_set.add(exp_id)

_log.debug("Waiting for snaps...")
Expand All @@ -336,9 +334,8 @@ def next_visit_handler() -> Tuple[str, int]:
_log.debug("Received %r", oid)
group_id = get_group_id_from_oid(oid)
if group_id == expected_visit.groupId:
exp_id = get_exp_id_from_oid(oid)
# Ingest the snap
mwi.ingest_image(oid)
exp_id = mwi.ingest_image(oid)
expid_set.add(exp_id)
except ValueError:
_log.error(f"Failed to match object id '{oid}'")
Expand Down

0 comments on commit 0481bc8

Please sign in to comment.