BUG: Fixed looped error handling in SDK
This commit is contained in:
@@ -284,7 +284,14 @@ class AppBase:
|
||||
try:
|
||||
tmp = await func(**subparams)
|
||||
except:
|
||||
tmp = "An error occured for value %s" % subparams
|
||||
e = ""
|
||||
try:
|
||||
e = sys.exc_info()[1]
|
||||
except:
|
||||
print("Exc check fail: %s" % e)
|
||||
pass
|
||||
|
||||
tmp = "An error occured during execution: %s" % e
|
||||
|
||||
print("RET from execution: %s" % ret)
|
||||
new_value = tmp
|
||||
|
||||
@@ -407,12 +407,15 @@ const Workflows = (props) => {
|
||||
}
|
||||
|
||||
const copyWorkflow = (data) => {
|
||||
data = JSON.parse(JSON.stringify(data))
|
||||
alert.success("Copying workflow "+data.name)
|
||||
console.log("data: ", data)
|
||||
data.id = ""
|
||||
data.name = data.name+"_copy"
|
||||
//return
|
||||
|
||||
fetch(globalUrl+"/api/v1/workflows", {
|
||||
method: 'POST',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
@@ -427,9 +430,9 @@ const Workflows = (props) => {
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.then((responseJson) => {
|
||||
.then((responseJson) => {
|
||||
getAvailableWorkflows()
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
alert.error(error.toString())
|
||||
});
|
||||
|
||||
@@ -138,7 +138,7 @@ func deployWorker(image string, identifier string, env []string) {
|
||||
|
||||
// form container id and use it as network source if it's not empty
|
||||
if containerId != "" {
|
||||
log.Printf("[INFO] Found container ID %s", containerId)
|
||||
//log.Printf("[INFO] Found container ID %s", containerId)
|
||||
hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId))
|
||||
} else {
|
||||
//log.Printf("[INFO] Empty self container id, continue without NetworkMode")
|
||||
|
||||
Reference in New Issue
Block a user