Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanierh committed Oct 17, 2023
1 parent 20fb1e8 commit adef172
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions front/lib/api/assistant/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export async function retryAgentMessageWithPubSub(
): Promise<Result<AgentMessageType, PubSubError>> {
const promise: Promise<Result<AgentMessageType, PubSubError>> = new Promise(
(resolve) => {
void (async () => {
void wakeLock(async () => {
const redis = await redisClient();
let didResolve = false;
try {
Expand Down Expand Up @@ -255,7 +255,7 @@ export async function retryAgentMessageWithPubSub(
);
}
}
})();
});
}
);

Expand Down
3 changes: 3 additions & 0 deletions front/pages/api/[preStopSecret]/prestop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ async function handler(
return;
}

logger.info("Received prestop request, waiting 10s");
await new Promise((resolve) => setTimeout(resolve, 10000));

while (!wakeLockIsFree()) {
logger.info("Waiting for wake lock to be free");
await new Promise((resolve) => setTimeout(resolve, 1000));
Expand Down
3 changes: 1 addition & 2 deletions front/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"downlevelIteration": true,
"paths": {
"@app/*": ["./*"]
},
"allowUnreachableCode": true
}
},
"include": [
"global.d.ts",
Expand Down

0 comments on commit adef172

Please sign in to comment.