refactor(utils/scheduleTick): Await database connection

This commit is contained in:
Linden committed 2022-02-25 17:11:28 +11:00
1 parent 2d28c447ec
commit ec53b3282d
6 files changed
+30 -13

No files matched your search

+2 -2
View File
@@ -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);