Socket
Book a DemoInstallSign in
Socket

@forge/events

Package Overview
Dependencies
Maintainers
1
Versions
405
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/events

Forge Async Event methods

latest
npmnpm
Version
2.0.6
Version published
Weekly downloads
4.7K
23.53%
Maintainers
1
Weekly downloads
 
Created
Source

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 {
    // process the event
  } catch (error) {
    await jobProgress.cancel();
  }
}

Support

See Get help for how to get help and provide feedback.

FAQs

Package last updated on 24 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts