Add MariaDB queue table. Fix Bugs

This commit is contained in:
2026-10-18 15:58:02 +01:00
parent d872c3661a
commit f9ba5f8657
28 changed files with 785 additions and 49 deletions
+21
View File
@@ -0,0 +1,21 @@
import type { BunMariaDBConfig, DBResponseObject } from "../../types";
type Params<Schema extends {
[k: string]: any;
} = {
[k: string]: any;
}, Table extends string = string> = {
table: Table;
data: Schema[];
/** Wait this long before the jobs can be claimed */
delay_ms?: number;
config?: BunMariaDBConfig;
};
/**
* Add jobs to a queue table.
*/
export default function QueuePush<Schema extends {
[k: string]: any;
} = {
[k: string]: any;
}, Table extends string = string>({ table, data, delay_ms, config, }: Params<Schema, Table>): Promise<DBResponseObject>;
export {};