Add MariaDB queue table. Fix Bugs
This commit is contained in:
Vendored
+21
@@ -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 {};
|
||||
Reference in New Issue
Block a user