Skip to content

AgendaModule

@tsed/agenda

Usage

typescript
import { AgendaModule } from "@tsed/agenda";

See /packages/third-parties/agenda/src/types/AgendaModule.ts.

Overview

ts
class AgendaModule implements OnDestroy, AfterListen {
    protected logger: Logger;
    protected injector: InjectorService;
    protected agenda: AgendaService;
    
    $afterListen(): Promise<any>;
    $onDestroy(): Promise<any>;
    define(name: string, options?: any, processor?: any): void;
    every(interval: string, name: string, data?: any, options?: any): Promise<any>;
    schedule(when: Date | string, name: string, data?: any): Promise<Job<import("agenda").JobAttributesData>>;
    now(name: string, data?: any): Promise<Job<import("agenda").JobAttributesData>>;
    create(name: string, data?: any): Job<import("agenda").JobAttributesData>;
    protected getProviders(): Provider<any>[];
    protected addAgendaDefinitionsForProvider(provider: Provider): void;
    protected scheduleJobsForProvider(provider: Provider<any>): Promise<void>;
    protected getNameForJob(propertyKey: string, namespace?: string, customName?: string): string;
}

protected logger

ts
protected logger: Logger;

protected injector

ts
protected injector: InjectorService;

protected agenda

ts
protected agenda: AgendaService;

$afterListen

ts
$afterListen(): Promise<any>;

$onDestroy

ts
$onDestroy(): Promise<any>;

define

ts
define(name: string, options?: any, processor?: any): void;

every

ts
every(interval: string, name: string, data?: any, options?: any): Promise<any>;

schedule

ts
schedule(when: Date | string, name: string, data?: any): Promise<Job<import("agenda").JobAttributesData>>;

now

ts
now(name: string, data?: any): Promise<Job<import("agenda").JobAttributesData>>;

create

ts
create(name: string, data?: any): Job<import("agenda").JobAttributesData>;

protected getProviders

ts
protected getProviders(): Provider<any>[];

protected addAgendaDefinitionsForProvider

ts
protected addAgendaDefinitionsForProvider(provider: Provider): void;

protected scheduleJobsForProvider

ts
protected scheduleJobsForProvider(provider: Provider<any>): Promise<void>;

protected getNameForJob

ts
protected getNameForJob(propertyKey: string, namespace?: string, customName?: string): string;

Released under the MIT License.