Skip to content

Commit 163359a

Browse files
author
Matthew Fisher
committed
feat(builder): scale the web process by 1
If no container structure has been specified for a release, we can safely assume that a web process exists. The application should be scaled by 1.
1 parent decd712 commit 163359a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

controller/api/models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ def destroy(self, *args, **kwargs):
123123
c.destroy()
124124

125125
def deploy(self, release):
126-
return tasks.deploy_release.delay(self, release).get()
126+
tasks.deploy_release.delay(self, release).get()
127+
if self.structure == {}:
128+
# scale the web process by 1 initially
129+
self.structure = {'web': 1}
130+
self.save()
131+
self.scale()
127132

128133
def scale(self, **kwargs):
129134
"""Scale containers up or down to match requested."""

0 commit comments

Comments
 (0)