feat: update ApiTokenGuard to always allow access, add updateDatabase method to ProjectService, enhance QueryExecuterService with job options, integrate QueueModule in QueryModule, apply ApiTokenGuard to RedisManagerController, refactor Plugin class to include methods, implement new methods in RedisPlugin, and remove unused async.js module
This commit is contained in:
@ -51,11 +51,19 @@ export class QueryExecuterService {
|
||||
queryData: any,
|
||||
headers: Record<string, any> = {}
|
||||
): Promise<QueryResponse> {
|
||||
const job = await this.queryQueue.add(`${new Date().getTime()}_${token}`, {
|
||||
token,
|
||||
queryData,
|
||||
headers,
|
||||
});
|
||||
const job = await this.queryQueue.add(
|
||||
`${new Date().getTime()}_${token}`,
|
||||
{
|
||||
token,
|
||||
queryData,
|
||||
headers,
|
||||
},
|
||||
{
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true,
|
||||
attempts: 3,
|
||||
}
|
||||
);
|
||||
|
||||
const result = await job.waitUntilFinished(this.queueEvents);
|
||||
return result;
|
||||
@ -82,7 +90,7 @@ export class QueryExecuterService {
|
||||
headers
|
||||
);
|
||||
|
||||
if (this.checkResponse(result)) {
|
||||
if (!this.checkResponse(result)) {
|
||||
throw new Error(`Error initializing VM: ${JSON.stringify(result)}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user