https://dagster.io/ logo
#ask-community
Title
# ask-community
j

Jordan

02/10/2023, 12:54 PM
Hi! I use a run failure sensor that monitors all repositories. I noticed that runs that were not in error were detected at certain times
s

sean

02/10/2023, 1:50 PM
Hi Jordan, thanks-- is it possible for you to share some code? Just want to confirm this is a bug.
j

Jordan

02/10/2023, 2:40 PM
I'm not sure my code can help you much. I added this sensor inside one of the repositories. The sensor ticks every thirty seconds and during the time I noticed this problem there were between fifty and a hundred jobs that ran.
Copy code
@run_failure_sensor(
            name="slack_sensor",
           default_status=DefaultSensorStatus.RUNNING,
            monitor_all_repositories=True,
        )
        def slack_on_failure(context: RunFailureSensorContext):

            blocks = ...

            response = self.client.send(text="message", blocks=blocks)

            assert response.status_code == 200