Skip to content

Commit

Permalink
crash dummy: don't stop on first task fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Sep 27, 2024
1 parent 80f04fe commit a860014
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ jobs:
SKYSCAN_MQ_TOCLIENT_AUTH_TOKEN: password # using this would override password in address
SKYSCAN_MQ_FROMCLIENT_BROKER_ADDRESS: user1@localhost/test
SKYSCAN_MQ_FROMCLIENT_AUTH_TOKEN: password # using this would override password in address
EWMS_PILOT_STOP_LISTENING_ON_TASK_ERROR: False # we want many crashes
services:
rabbitmq:
# see image.tag -> https://github.com/Observation-Management-Service/path-kubernetes/blob/main/helm-values-rabbitmq-bitnami.yaml (see https://artifacthub.io/packages/helm/bitnami/rabbitmq/11.14.3)
Expand Down
5 changes: 3 additions & 2 deletions skymap_scanner/recos/crash_dummy.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""IceTray segment for a dummy reco (will crash w/in a given probability)."""


import random
import time
from typing import Final

from icecube import icetray # type: ignore[import] # noqa: F401

from ..config import ENV
from . import RecoInterface, dummy
from ..config import ENV


class CrashDummy(dummy.Dummy):
Expand All @@ -31,6 +31,7 @@ def crash(frame):
logger.debug(f"crashing with '{fail}'")
if fail == "infinite-loop":
while True: # to infinity!
time.sleep(1)
continue
elif fail == "error":
raise KeyError("intentional crash-dummy error")
Expand Down

0 comments on commit a860014

Please sign in to comment.