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

bug: project entering a state loop #1260

Merged
merged 2 commits into from Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions gateway/src/project.rs
Expand Up @@ -502,11 +502,13 @@ where
ContainerStateStatusEnum::RUNNING => {
Self::Started(ProjectStarted::new(container, VecDeque::new()))
}
ContainerStateStatusEnum::CREATED => Self::Starting(ProjectStarting {
// We can reach the starting state because either:
// - The project was created for the first time
// - It crashed and we are restarting it
ContainerStateStatusEnum::CREATED | ContainerStateStatusEnum::EXITED => Self::Starting(ProjectStarting {
container,
restart_count,
}),
ContainerStateStatusEnum::EXITED => Self::Restarting(ProjectRestarting { container, restart_count: 0 }),
_ => {
return Err(Error::custom(
ErrorKind::Internal,
Expand Down