Alarm Service - rettersoft/rbs-docs GitHub Wiki
RBS Alarm Service
This service provides queries and mutations for time-based operations.
Models
SetAlarmInput {
waitSeconds: number
data: any // sender will receive this data back after $waitSeconds seconds
}
CancelAlarmInput {
executionId: string
cause?: string
error?: string
}
When an alarm triggered, "rbs.alarm.event.UP" event will be fired with given data
Working With Alarms
rbs.alarm.request.SET : creates a new alarm
Example Request : { "waitSeconds": 3600, "data": { "orderId": "ORDER_123" } }
Example Response : { "executionId": "EXECUTION_ID" }
rbs.alarm.request.CANCEL : cancels an existing alarm
Example Request : { "executionId": "EXECUTION_ID" }
Example Response : { "EXECUTION_ID": "OFF" }
TODO
- Implement repeatable alarms