queue-manager-pro
Version:
A flexible, TypeScript-first queue/task manager with pluggable backends ,dynamic persistence storage and event hooks.
27 lines • 875 B
JavaScript
import { BaseQueueRepository } from './base.repository.js';
export class CustomQueueRepository extends BaseQueueRepository {
customProps;
constructor(customProps) {
super(customProps.MAX_RETRIES, customProps.MAX_PROCESSING_TIME);
this.customProps = customProps;
}
async deleteTask(id, hardDelete) {
return this.customProps.deleteTask(id, hardDelete);
}
async loadTasks(status) {
return this.customProps.loadTasks(status);
}
async saveTasks(tasks, _status) {
return this.customProps.saveTasks(tasks, _status);
}
async updateTask(id, obj) {
return this.customProps.updateTask(id, obj);
}
async enqueue(task) {
return this.customProps.enqueue(task);
}
async dequeue() {
return this.customProps.dequeue();
}
}
//# sourceMappingURL=custom.repository.js.map