Set a checkpoint on a bot. A bot checkpoints a position it has read to in a queue it reads from and marks the last position it wrote to for queues that it writes to. The position is an event ID.
The ID of the bot to checkpoint
The queue to checkpoint for this bot
The checkpoint details themselves that will be saved
A callback that will be called if something goes wrong
Used internally by the SDK to create a new bot. This should only ever be used if creating a bot that does not go through cloud formation.
Lock the given bot, marking it as currently running. Only one instance of a bot is meant to be running except in the special case of bots that are fanned out, meaning multiple instances of the same bot are running to scale horizontally.
The ID of the bot to mark running and thus "lock"
The ID that represents this instance of the running bot
How long to allow the bot to run dor
A callback that will be called if something goes wrong
Get all details on a bot from the RStreams bus bot DynamoDB table.
Get system by ID not by alias.
Returns a system.
Get checkpoint data for the bot and the given queue.
The ID of the bot to get checkpoint data for
The queue to get checkpoint data for connected to this bot
A promise so it can play nice with async/await that contains the checkpoint data
Remove the lock on the given bot, marking it as not currently running.
The ID of the bot to mark not running and thus remove the lock on
The ID that represents this instance of the running bot
A callback that will be called if something goes wrong
Mark a bot done running.
??
The ID of the bot running right now to mark complete
??
??
Whether to force it to comlete
A callback that will be called if something goes wrong
Tells the SDK that as soon as this bot ends, run it again. Most of the time developers don't need to do this as the SDK will just do the right thing.
Schedule a one-time invocation of the bot named id
using duration
to know when to do so.
The name of the bot to invoke
When to invoke it
Immediately trigger the bot named cron.id
, meaning invoke the underlying code (usually a lambda).
This contains id
which is the name of the bot to invoke
A callback that will be called if something goes wrong
Generated using TypeDoc
This is the set of operations that act on the RStreams bus instance's bot DynamoDB table that tracks all bots, the checkpoints for those bots to various queues and other information. It is rare indeed that a developer would ever need to use these to interact directly with the bot DynamoDB table.
Note! This is named LeoCron because the DynamoDB table is named LeoCron for legacy reasons. It will likely get a more current name in the future, like "BotManager". The term
Cron
was historically associated with the bot concept because initially, bots were only invoked on a cron and did not support invocation on a push or pull model as they do today.