Skip to content

Commit d5c0d40

Browse files
committed
fix(controller): format command before creating container
The self._command_announceable() check was called inline with code that formatted the container's command, so no announcer would be created since the command showed up as "start {c_type}" literally. The _command property is only referenced in this code.
1 parent a6ff41b commit d5c0d40

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

controller/api/models.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def _get_command(self):
298298
if c_type == 'cmd':
299299
return ''
300300
else:
301-
return 'start {c_type}'
301+
return "start {}".format(c_type)
302302
else:
303303
return ''
304304

@@ -311,10 +311,9 @@ def _command_announceable(self):
311311
@transition(field=state, source=INITIALIZED, target=CREATED)
312312
def create(self):
313313
image = self.release.image
314-
c_type = self.type
315314
self._scheduler.create(name=self._job_id,
316315
image=image,
317-
command=self._command.format(**locals()),
316+
command=self._command,
318317
use_announcer=self._command_announceable())
319318

320319
@close_db_connections

0 commit comments

Comments
 (0)