Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix api workflow #310

Merged
merged 4 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading