Massive alarm acknoledgement

Hi all
I am using a function to ack all the unack alarms all at once by clicking a button. It works fine most of time but when there is a huge number of un-ack alarms it crashes. This is my code:

	alarmEvents = system.alarm.queryStatus(state=["ActiveUnacked"])
	alarmIds = [str(event.getId()) for event in alarmEvents]
	system.alarm.acknowledge(alarmIds, "acked all from script")

Is there a better / more efficient way to ack all alarms?

Wrap that in a function and run it using system.util.invokeAsynchronous().

Event better would be to place it in a gateway message handler and use sendMessage() to trigger it – that way the alarms to ack don’t have to make a round trip.

Thank you Phil
will try