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