We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51f5d6d commit a20798aCopy full SHA for a20798a
1 file changed
controller/api/models.py
@@ -239,9 +239,19 @@ def _get_scheduler(self):
239
240
_scheduler = property(_get_scheduler)
241
242
+ def _get_command(self):
243
+ c_type = self.type
244
+ if c_type:
245
+ return 'start {c_type}'
246
+ else:
247
+ return ''
248
+
249
+ _command = property(_get_command)
250
251
def create(self):
252
image = self.release.build.image
- self._scheduler.create(self._job_id, image, 'docker run {image}'.format(**locals()))
253
254
+ self._scheduler.create(self._job_id, image, self._command.format(**locals()))
255
self.state = 'created'
256
self.save()
257
0 commit comments