Hi! I use a run failure sensor that monitors all r...
# ask-community
j
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
Hi Jordan, thanks-- is it possible for you to share some code? Just want to confirm this is a bug.
j
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