mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
04c3d81b1f
* shared * server * app * remove vestigial eslintrc files * update comment directives
19 lines
550 B
TypeScript
19 lines
550 B
TypeScript
import { Event } from "@server/types";
|
|
|
|
export default abstract class BaseProcessor {
|
|
static applicableEvents: (Event["name"] | "*")[] = [];
|
|
|
|
public abstract perform(event: Event): Promise<void>;
|
|
|
|
/**
|
|
* Handle failure when all attempts are exhausted for the processor.
|
|
*
|
|
* @param event processor event
|
|
* @returns A promise that resolves once the processor handles the failure.
|
|
*/
|
|
// oxlint-disable-next-line @typescript-eslint/no-unused-vars
|
|
public onFailed(event: Event): Promise<void> {
|
|
return Promise.resolve();
|
|
}
|
|
}
|