Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-43090: next-visit-fan-out for LSSTComCamSim for dev #11

Merged
merged 3 commits into from
Feb 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ async def main() -> None:
offset = os.environ["OFFSET"]
kafka_schema_registry_url = os.environ["KAFKA_SCHEMA_REGISTRY_URL"]
latiss_knative_serving_url = os.environ["LATISS_KNATIVE_SERVING_URL"]
hsinfang marked this conversation as resolved.
Show resolved Hide resolved
lsstcomcamsim_knative_serving_url = os.environ["LSSTCOMCAMSIM_KNATIVE_SERVING_URL"]
lsst_cam_knative_serving_url = os.environ["LSST_CAM_KNATIVE_SERVING_URL"]
hsc_knative_serving_url = os.environ["HSC_KNATIVE_SERVING_URL"]

Expand Down Expand Up @@ -209,6 +210,10 @@ async def main() -> None:
"lsstcomcam_next_visit_messages",
"next visit nessages with lsstcomcam as instrument",
)
lsstcomcamsim_gauge = Gauge(
"lsstcomcamsim_next_visit_messages",
"next visit nessages with lsstcomcamsim as instrument",
)
hsc_gauge = Gauge(
"hsc_next_visit_messages", "next visit nessages with hsc as instrument"
)
Expand All @@ -232,6 +237,11 @@ async def main() -> None:
"lsstcomcam in process requests for next visit",
)

lsstcomcamsim_in_process_requests_gauge = Gauge(
"lsstcomcamsim_prompt_processing_in_process_requests",
"lsstcomcamsim in process requests for next visit",
)

await consumer.start()

tasks = set()
Expand Down Expand Up @@ -305,10 +315,17 @@ async def main() -> None:
)
knative_serving_url = latiss_knative_serving_url
in_process_requests_gauge = latiss_in_process_requests_gauge
# case "LSSTComCam":
# fan_out_message_list = next_visit_message.add_detectors(
# next_visit_message, lsst_com_cam_active_detectors
# )
case 3: # LSSTComCamSim
kfindeisen marked this conversation as resolved.
Show resolved Hide resolved
lsstcomcamsim_gauge.inc()
fan_out_message_list = (
next_visit_message_updated.add_detectors(
dataclasses.asdict(next_visit_message_updated),
# Just use ComCam active detector config.
lsst_com_cam_active_detectors,
)
)
knative_serving_url = lsstcomcamsim_knative_serving_url
in_process_requests_gauge = lsstcomcamsim_in_process_requests_gauge
case 1: # LSSTCam
lsstcam_gauge.inc()
fan_out_message_list = (
Expand Down