mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 22:21:51 +00:00
refactor(utils/scheduleTick): Await database connection
This commit is contained in:
1 parent
2d28c447ec
commit
ec53b3282d
6 files changed
+30
-13
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import { pool } from '.';
|
||||
import { parseArguments } from '../utils/parseArguments';
|
||||
import { scheduleTick } from '../config';
|
||||
import { parseResponse } from '../utils/parseResponse';
|
||||
import { logQuery } from '../logger';
|
||||
import type { CFXCallback, CFXParameters } from '../types';
|
||||
import type { QueryType } from '../types';
|
||||
import { scheduleTick } from '../utils/scheduleTick';
|
||||
|
||||
export const rawQuery = async (
|
||||
type: QueryType,
|
||||
@@ -13,7 +13,7 @@ export const rawQuery = async (
|
||||
parameters: CFXParameters,
|
||||
cb?: CFXCallback
|
||||
) => {
|
||||
scheduleTick();
|
||||
await scheduleTick();
|
||||
|
||||
try {
|
||||
[query, parameters, cb] = parseArguments(invokingResource, query, parameters, cb);
|
||||
|
||||
Reference in new issue
Block a user