Hello, is it possible to make it so the trigger only activates and processes the rule only if the message received was MHeartbeat?
I have a registeredTemplate that is queried in the rule and this template is constantly being created and altered in the ledger, leading to unnecessary processing on the trigger. As such, I’d like for the trigger to only query the ledger and emitCommands every minute instead.
As far as I understand, this might be possible by altering the updateState?
trigger : Trigger ()
trigger = Trigger
{ initialize = const ()
, updateState = \_-> ()
, rule = triggerRule
, registeredTemplates = RegisteredTemplates
[ registeredTemplate @Token
]
, heartbeat = Some $ minutes 1
}