#65: Re-fixed automated action parsing in app sdk

This commit is contained in:
frikky
2020-06-19 06:46:05 +02:00
parent 60b0f783a3
commit 6652fa7996
4 changed files with 15 additions and 11 deletions
+2 -4
View File
@@ -434,9 +434,7 @@ class AppBase:
tmpvalue = ""
self.logger.info("ACTION FIELD: %s" % parameter["action_field"])
#"$%s%s" %
fullname = "$"
if parameter["action_field"] == "Execution Argument":
tmpvalue = fullexecution["execution_argument"]
fullname += "exec"
@@ -445,8 +443,8 @@ class AppBase:
if parameter["value"].startswith(jsonparsevalue):
fullname += parameter["value"][2:]
else:
fullname = "$%s" % parameter["action_field"]
#else:
# fullname = "$%s" % parameter["action_field"]
self.logger.info("Fullname: %s" % fullname)
actualitem = re.findall(match, fullname, re.MULTILINE)
+5 -5
View File
@@ -190,14 +190,14 @@ func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder strin
buildOptions,
)
//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 {
// 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
}
+6
View File
@@ -5957,12 +5957,14 @@ func handleAppHotload(location string) error {
// Handles configuration items during Shuffle startup
func runInit(ctx context.Context) {
// Setting stats for backend starts (failure count as well)
log.Printf("Starting INIT setup")
err := increaseStatisticsField(ctx, "backend_executions", "", 1)
if err != nil {
log.Printf("Failed increasing local stats: %s", err)
}
// Fix active users etc
log.Printf("Reformatting users")
q := datastore.NewQuery("Users").Filter("active =", true)
var users []User
_, err = dbclient.GetAll(ctx, q, &users)
@@ -6006,6 +6008,7 @@ func runInit(ctx context.Context) {
}
// Gets environments and inits if it doesn't exist
log.Printf("Setting up environments")
count, err := getEnvironmentCount()
if count == 0 && err == nil {
item := Environment{
@@ -6020,6 +6023,7 @@ func runInit(ctx context.Context) {
}
// Gets schedules and starts them
log.Printf("Relaunching schedules")
schedules, err := getAllSchedules(ctx)
if err != nil {
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
log.Printf("Getting remote workflow apps")
workflowapps, err := getAllWorkflowApps(ctx)
if err != nil {
log.Printf("Failed getting apps: %s", err)
@@ -6136,6 +6141,7 @@ func init() {
if err != nil {
panic(fmt.Sprintf("DBclient error during init: %s", err))
}
log.Printf("Finished Shuffle database init")
go runInit(ctx)
+2 -2
View File
@@ -1,7 +1,7 @@
version: '3'
services:
frontend:
#build: ./frontend
build: ./frontend
image: frikky/shuffle:frontend
container_name: shuffle-frontend
hostname: shuffle-frontend
@@ -14,7 +14,7 @@ services:
depends_on:
- backend
backend:
#build: ./backend
build: ./backend
image: frikky/shuffle:backend
container_name: shuffle-backend
hostname: ${BACKEND_HOSTNAME}