Added tracker of selected executions

This commit is contained in:
frikky
2021-01-20 16:03:01 +01:00
parent 792a0b86ca
commit 42bfa92c81
10 changed files with 60 additions and 25 deletions
+1 -1
View File
@@ -601,7 +601,7 @@ class AppBase:
self.full_execution = fullexecution
self.logger.info("AFTER FULLEXEC stream result")
self.logger.info("AFTER FULLEXEC stream result (init)")
# Gets the value at the parenthesis level you want
def parse_nested_param(string, level):
+2 -2
View File
@@ -412,8 +412,8 @@ func makePythoncode(swagger *openapi3.Swagger, name, url, method string, paramet
fileBalance,
)
//log.Printf("FUNCTION: %s", data)
if strings.Contains(functionname, "filescan") {
if strings.Contains(functionname, "get_list_rulesssss") {
//log.Printf("FUNCTION: %s", data)
log.Println(data)
log.Printf("Queries: %s", queryString)
}
+1 -1
View File
@@ -190,7 +190,7 @@ func fixTags(tags []string) []string {
*/
// Custom Docker image builder wrapper in memory
func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder string) error {
func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder string, downloadIfFail bool) error {
ctx := context.Background()
client, err := client.NewEnvClient()
if err != nil {
+8 -6
View File
@@ -909,8 +909,6 @@ func validateNewWorkerExecution(body []byte) error {
return err
}
//log.Printf("LEN: %s", string(body))
//log.Printf("LEN: %d", len(string(body)))
baseExecution, err := getWorkflowExecution(ctx, execution.ExecutionId)
if err != nil {
log.Printf("[ERROR] Failed getting execution (workflowqueue) %s: %s", execution.ExecutionId, err)
@@ -6421,7 +6419,7 @@ func iterateAppGithubFolders(fs billy.Filesystem, dir []os.FileInfo, extra strin
if len(extra) == 0 {
log.Printf("[INFO] Starting build of %d containers (FIRST)", len(buildLaterFirst))
for _, item := range buildLaterFirst {
err = buildImageMemory(fs, item.Tags, item.Extra)
err = buildImageMemory(fs, item.Tags, item.Extra, true)
if err != nil {
log.Printf("Failed image build memory: %s", err)
} else {
@@ -6435,7 +6433,7 @@ func iterateAppGithubFolders(fs billy.Filesystem, dir []os.FileInfo, extra strin
log.Printf("[INFO] Starting build of %d skipped docker images", len(buildLaterList))
for _, item := range buildLaterList {
err = buildImageMemory(fs, item.Tags, item.Extra)
err = buildImageMemory(fs, item.Tags, item.Extra, true)
if err != nil {
log.Printf("[INFO] Failed image build memory: %s", err)
} else {
@@ -6647,15 +6645,19 @@ func getAllSchedules(ctx context.Context, orgId string) ([]ScheduleOld, error) {
return schedules, nil
}
//FIXME: Add cursor
func getAllWorkflowApps(ctx context.Context) ([]WorkflowApp, error) {
var allworkflowapps []WorkflowApp
q := datastore.NewQuery("workflowapp").Order("-edited").Limit(50)
q := datastore.NewQuery("workflowapp").Order("-edited").Limit(40)
//Activated bool `json:"activated" yaml:"activated" required:false datastore:"activated"`
//Activated bool `json:"activated" yaml:"activated" required:false datastore:"activated"`
_, err := dbclient.GetAll(ctx, q, &allworkflowapps)
if err != nil {
if strings.Contains(fmt.Sprintf("%s", err), "ResourceExhausted") {
q := datastore.NewQuery("workflowapp").Limit(40).Order("-edited")
//datastore.NewQuery("workflowapp").Limit(30).Order("-edited")
q = datastore.NewQuery("workflowapp").Order("-edited").Limit(27)
//q := q.Limit(25)
_, err := dbclient.GetAll(ctx, q, &allworkflowapps)
if err != nil {
return []WorkflowApp{}, err