UNPKG

@rsksmart/rif-storage-pinning

Version:

Application for providing your storage space to other to use in exchange of RIF Tokens

25 lines (24 loc) 863 B
/// <reference types="node" /> import { EventEmitter } from 'events'; import JobModel from './models/job.model'; import { JobManagerOptions } from './definitions'; export declare const FINISHED_EVENT_NAME = "finished"; export declare abstract class Job extends EventEmitter { readonly entity: JobModel; protected constructor(name: string, agreementReference: string, type?: string); abstract _run(): Promise<void>; get name(): string; get type(): string; get state(): string; get agreementReference(): string; run(): void; retry(count: number, total: number): Promise<void>; } export declare class JobsManager { private readonly retries; private readonly backoffStart; private readonly isExponentialBackoff; constructor(options?: JobManagerOptions); private handleError; run(job: Job): Promise<void>; }