Component evidence

types/AgendaBackend.ts

agenda · packages/agenda/src/types/AgendaBackend.ts · typescript · MIT
databaseDatabase / ORM

Defines the backend interface for the agenda job queue, enabling custom storage and notifications.

Source preview first 800 characters · full source over MCP
// Source: https://github.com/agenda/agenda | License: MIT | Copyright 2013 Ryan Schmukler <ryan@slingingcode.com>
// Provided via justclaw.it.com; keep this notice with the code.
import type { JobRepository } from './JobRepository.js';
import type { NotificationChannel } from './NotificationChannel.js';
import type { JobLogger } from './JobLogger.js';

/**
 * Unified backend interface for Agenda.
 *
 * A backend provides storage (required) and optionally notifications.
 * This allows a single driver to implement both capabilities (e.g., PostgreSQL with LISTEN/NOTIFY)
 * or just storage (e.g., MongoDB without notifications).
 *
 * Examples:
 * - MongoBackend: provides repository only (polling-based)
 * - PostgresBackend: provides repository + notificationChannel (LISTEN/NOTIFY)
 * - Custom

... (truncated -- full source via MCP)