Skip to content

Commit

Permalink
switching service dialog update to use service wrapper and allowing c…
Browse files Browse the repository at this point in the history
…uesubmit to use the set service. (#189)
  • Loading branch information
Greg Denton authored Feb 6, 2019
1 parent d0bc79c commit 8833c2a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 11 additions & 10 deletions cuegui/cuegui/ServiceDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,16 @@ def save(self):
QtWidgets.QMessageBox.critical(self, "Error", "The service name must alphanumeric.")
return

data = opencue.api.service_pb2.Service()
data.name = str(self.name.text())
data.threadable = self.threadable.isChecked()
data.min_cores = self.min_cores.value()
data.max_cores = self.max_cores.value()
data.min_memory = self.min_memory.value() * 1024
data.min_gpu = self.min_gpu.value() * 1024

data.tags.extend(self._tags_w.get_tags())
data = opencue.wrappers.service.Service()
data.data.id = self.__service.id
data.setName(str(self.name.text()))
data.setThreadable(self.threadable.isChecked())
data.setMinCores(self.min_cores.value())
data.setMaxCores(self.max_cores.value())
data.setMinMemory(self.min_memory.value() * 1024)
data.setMinGpu(self.min_gpu.value() * 1024)
data.setTags(self._tags_w.get_tags())

self.saved.emit(data)


Expand Down Expand Up @@ -221,7 +222,7 @@ def saved(self, data):
else:
opencue.api.createService(data)
else:
self.__selected.update(data)
data.update()

self.refresh()
self.__new_service = False
Expand Down
2 changes: 2 additions & 0 deletions cuesubmit/cuesubmit/Submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def buildLayer(layerData, command):
"""
layer = Shell(layerData.name, command=command.split(), chunk=layerData.chunk,
threads=float(layerData.cores), range=str(layerData.layerRange))
if layerData.services:
layer.set_service(layerData.services[0])
if layerData.dependType and layerData.dependsOn:
if layerData.dependType == 'Layer':
layer.depend_all(layerData.dependsOn)
Expand Down

0 comments on commit 8833c2a

Please sign in to comment.