Skip to content

Commit

Permalink
fix api workflow (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
chavda-bhavik committed Aug 4, 2023
2 parents 31310e7 + 397ea26 commit 8ecfb75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-prod-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod
docker run --network=host --name api -dit --env NODE_ENV=test --env JWT_SECRET=impler --env COOKIE_DOMAIN=impler ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG
docker run --network=host appropriate/curl --retry 10 --retry-delay 10 --retry-connrefused http://localhost:3000/v1/health-check | grep 'ok'
docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:3000/v1/health-check | grep 'ok'
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest
Expand Down
6 changes: 4 additions & 2 deletions apps/api/src/app/review/service/Sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ export class Sandbox {
if (executionMode === ExecutionModeEnum.UNSANDBOXED) {
const sanboxPath = path.join(__dirname, './sandbox/' + this.boxId);
if (!fs.existsSync(sanboxPath)) {
fs.mkdirSync(sanboxPath);
fs.mkdirSync(sanboxPath, {
recursive: true,
});
}

return sanboxPath;
Expand Down Expand Up @@ -295,7 +297,7 @@ export class SManager {
private readonly mutex: AsynMutex.Mutex = new AsynMutex.Mutex();

constructor() {
for (let boxId = 0; boxId < 1000; ++boxId) {
for (let boxId = 0; boxId < 10; ++boxId) {
this.sanboxes.set(
boxId,
new Sandbox({
Expand Down

0 comments on commit 8ecfb75

Please sign in to comment.