#65: Re-fixed automated action parsing in app sdk
This commit is contained in:
@@ -434,9 +434,7 @@ class AppBase:
|
|||||||
tmpvalue = ""
|
tmpvalue = ""
|
||||||
self.logger.info("ACTION FIELD: %s" % parameter["action_field"])
|
self.logger.info("ACTION FIELD: %s" % parameter["action_field"])
|
||||||
|
|
||||||
#"$%s%s" %
|
|
||||||
fullname = "$"
|
fullname = "$"
|
||||||
|
|
||||||
if parameter["action_field"] == "Execution Argument":
|
if parameter["action_field"] == "Execution Argument":
|
||||||
tmpvalue = fullexecution["execution_argument"]
|
tmpvalue = fullexecution["execution_argument"]
|
||||||
fullname += "exec"
|
fullname += "exec"
|
||||||
@@ -445,8 +443,8 @@ class AppBase:
|
|||||||
|
|
||||||
if parameter["value"].startswith(jsonparsevalue):
|
if parameter["value"].startswith(jsonparsevalue):
|
||||||
fullname += parameter["value"][2:]
|
fullname += parameter["value"][2:]
|
||||||
else:
|
#else:
|
||||||
fullname = "$%s" % parameter["action_field"]
|
# fullname = "$%s" % parameter["action_field"]
|
||||||
|
|
||||||
self.logger.info("Fullname: %s" % fullname)
|
self.logger.info("Fullname: %s" % fullname)
|
||||||
actualitem = re.findall(match, fullname, re.MULTILINE)
|
actualitem = re.findall(match, fullname, re.MULTILINE)
|
||||||
|
|||||||
@@ -190,14 +190,14 @@ func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder strin
|
|||||||
buildOptions,
|
buildOptions,
|
||||||
)
|
)
|
||||||
//log.Printf("IMAGERESPONSE: %#v", imageBuildResponse.Body)
|
//log.Printf("IMAGERESPONSE: %#v", imageBuildResponse.Body)
|
||||||
defer imageBuildResponse.Body.Close()
|
|
||||||
_, newerr := io.Copy(os.Stdout, imageBuildResponse.Body)
|
|
||||||
if newerr != nil {
|
|
||||||
log.Printf("Failed reading Docker build STDOUT: %s", newerr)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Read the STDOUT from the build process
|
// Read the STDOUT from the build process
|
||||||
|
defer imageBuildResponse.Body.Close()
|
||||||
|
_, newerr := io.Copy(os.Stdout, imageBuildResponse.Body)
|
||||||
|
if newerr != nil {
|
||||||
|
log.Printf("Failed reading Docker build STDOUT: %s", newerr)
|
||||||
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5957,12 +5957,14 @@ func handleAppHotload(location string) error {
|
|||||||
// Handles configuration items during Shuffle startup
|
// Handles configuration items during Shuffle startup
|
||||||
func runInit(ctx context.Context) {
|
func runInit(ctx context.Context) {
|
||||||
// Setting stats for backend starts (failure count as well)
|
// Setting stats for backend starts (failure count as well)
|
||||||
|
log.Printf("Starting INIT setup")
|
||||||
err := increaseStatisticsField(ctx, "backend_executions", "", 1)
|
err := increaseStatisticsField(ctx, "backend_executions", "", 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed increasing local stats: %s", err)
|
log.Printf("Failed increasing local stats: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix active users etc
|
// Fix active users etc
|
||||||
|
log.Printf("Reformatting users")
|
||||||
q := datastore.NewQuery("Users").Filter("active =", true)
|
q := datastore.NewQuery("Users").Filter("active =", true)
|
||||||
var users []User
|
var users []User
|
||||||
_, err = dbclient.GetAll(ctx, q, &users)
|
_, err = dbclient.GetAll(ctx, q, &users)
|
||||||
@@ -6006,6 +6008,7 @@ func runInit(ctx context.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Gets environments and inits if it doesn't exist
|
// Gets environments and inits if it doesn't exist
|
||||||
|
log.Printf("Setting up environments")
|
||||||
count, err := getEnvironmentCount()
|
count, err := getEnvironmentCount()
|
||||||
if count == 0 && err == nil {
|
if count == 0 && err == nil {
|
||||||
item := Environment{
|
item := Environment{
|
||||||
@@ -6020,6 +6023,7 @@ func runInit(ctx context.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Gets schedules and starts them
|
// Gets schedules and starts them
|
||||||
|
log.Printf("Relaunching schedules")
|
||||||
schedules, err := getAllSchedules(ctx)
|
schedules, err := getAllSchedules(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed getting schedules during service init: %s", err)
|
log.Printf("Failed getting schedules during service init: %s", err)
|
||||||
@@ -6049,6 +6053,7 @@ func runInit(ctx context.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Getting apps to see if we should initialize a test
|
// Getting apps to see if we should initialize a test
|
||||||
|
log.Printf("Getting remote workflow apps")
|
||||||
workflowapps, err := getAllWorkflowApps(ctx)
|
workflowapps, err := getAllWorkflowApps(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed getting apps: %s", err)
|
log.Printf("Failed getting apps: %s", err)
|
||||||
@@ -6136,6 +6141,7 @@ func init() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("DBclient error during init: %s", err))
|
panic(fmt.Sprintf("DBclient error during init: %s", err))
|
||||||
}
|
}
|
||||||
|
log.Printf("Finished Shuffle database init")
|
||||||
|
|
||||||
go runInit(ctx)
|
go runInit(ctx)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
#build: ./frontend
|
build: ./frontend
|
||||||
image: frikky/shuffle:frontend
|
image: frikky/shuffle:frontend
|
||||||
container_name: shuffle-frontend
|
container_name: shuffle-frontend
|
||||||
hostname: shuffle-frontend
|
hostname: shuffle-frontend
|
||||||
@@ -14,7 +14,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
backend:
|
backend:
|
||||||
#build: ./backend
|
build: ./backend
|
||||||
image: frikky/shuffle:backend
|
image: frikky/shuffle:backend
|
||||||
container_name: shuffle-backend
|
container_name: shuffle-backend
|
||||||
hostname: ${BACKEND_HOSTNAME}
|
hostname: ${BACKEND_HOSTNAME}
|
||||||
|
|||||||
Reference in New Issue
Block a user