How to deal with frequent and time-consuming action


(qinhao) #1

Hi there

Here is my problem: i have a sensor to fetch alarms from an alarm-server, to clear the alarm ,there’s a action which is a python_runner type.

Occasionally a large number of alarms are generated in a short period, and the action is a time-consuming operation. so a large numer of subprocces are created in a short time.

how to deal with this situation, is there a common practice?


(Eugen C.) #2

If these alarms created in a really short period, you can use Policies — StackStorm 2.9.1 documentation Concurrency policy so from many alarms of similar type you get only one accepted.

If you need to limit X executions per Y time period, - it’s not possible yet. However there is a feature request where you can describe your case: Policy to rate-limit action executions · Issue #3720 · StackStorm/st2 · GitHub which will help us to prioritize it in future.