Skip to content

Commit

Permalink
fix(api): fixed condition in processProgram
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury4GL committed Oct 31, 2024
1 parent 4f6f735 commit 48a9a4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/src/controllers/internal/processProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const processProgram = async (
await moveFile(codePath + '.bkp', codePath)

// we now need to poll the session status
while (session.state === SessionState.completed) {
while (session.state !== SessionState.completed) {
await delay(50)
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion api/src/types/Session.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum SessionState {
initialising = 'initialising', // session is initialising and nor ready to be used yet
initialising = 'initialising', // session is initialising and not ready to be used yet
pending = 'pending', // session is ready to be used
running = 'running', // session is in use
completed = 'completed', // session is completed and can be destroyed
Expand Down

0 comments on commit 48a9a4d

Please sign in to comment.