Skip to content

PulseModule

@tsed/pulse

Usage

typescript
import { PulseModule } from "@tsed/pulse";

See /packages/third-parties/pulse/src/types/PulseModule.ts.

Overview

ts
class PulseModule implements OnDestroy, AfterListen {
    protected logger: Logger;
    protected injector: InjectorService;
    protected pulse: PulseService;
    
    $afterListen(): Promise<any>;
    $onDestroy(): Promise<any>;
    define<T extends JobAttributesData>(name: string, processor: Processor<T>, options?: DefineOptions): void;
    every(interval: string, name: string, data?: any, options?: any): Promise<Job<JobAttributesData> | Job<JobAttributesData>[]>;
    schedule(when: Date | string, name: string, data?: any): Promise<Job<{}>[]> | Promise<Job<any>>;
    now(name: string, data?: any): Promise<Job<JobAttributesData>>;
    create(name: string, data?: any): Job<any>;
    protected getProviders(): Provider<any>[];
    protected addPulseDefinitionsForProvider(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 pulse

ts
protected pulse: PulseService;

$afterListen

ts
$afterListen(): Promise<any>;

$onDestroy

ts
$onDestroy(): Promise<any>;

define

ts
define<T extends JobAttributesData>(name: string, processor: Processor<T>, options?: DefineOptions): void;

every

ts
every(interval: string, name: string, data?: any, options?: any): Promise<Job<JobAttributesData> | Job<JobAttributesData>[]>;

schedule

ts
schedule(when: Date | string, name: string, data?: any): Promise<Job<{}>[]> | Promise<Job<any>>;

now

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

create

ts
create(name: string, data?: any): Job<any>;

protected getProviders

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

protected addPulseDefinitionsForProvider

ts
protected addPulseDefinitionsForProvider(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.