Forge Events
Library for asynchronous data processing in Forge.
Requirements
See Set up Forge for details of the software required to develop Forge apps.
Usage
Pushing events to the queue
async function pushEvent() {
const { jobId } = await queue.push({
body: {
hello: 'world'
}
});
const jobProgress = queue.getJob(jobId);
const { success, inProgress, failed } = await jobProgress.getStats();
}
Consuming events from the queue
import { AsyncEvent } from '@forge/events';
export async function eventListener(event: AsyncEvent, context) {
const jobProgress = queue.getJob(event.jobId);
try {
} catch (error) {
await jobProgress.cancel();
}
}
Support
See Get help for how to get help and provide feedback.