Add MariaDB queue table. Fix Bugs
This commit is contained in:
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
import type { BunMariaDBConfig, DBResponseObject } from "../../types";
|
||||
type Params<Table extends string = string> = {
|
||||
table: Table;
|
||||
id: number | string;
|
||||
/** `queue_lock_token` from the claimed row */
|
||||
lock_token: string;
|
||||
config?: BunMariaDBConfig;
|
||||
};
|
||||
/**
|
||||
* Mark a claimed job as done: deletes it, or sets it to `done` when the
|
||||
* table has `keep_completed`.
|
||||
*
|
||||
* Fails when the lock token no longer matches, i.e. the lease expired and
|
||||
* another worker reclaimed the job.
|
||||
*/
|
||||
export default function QueueAck<Table extends string = string>({ table, id, lock_token, config, }: Params<Table>): Promise<DBResponseObject>;
|
||||
export {};
|
||||
Reference in New Issue
Block a user