Skip to content

Commit

Permalink
fix(task-get): Fix task tree bug when task is triggered by ext progra…
Browse files Browse the repository at this point in the history
…m task

Task trees with ext program tasks now work as expected.
  • Loading branch information
Göran Sander committed Oct 6, 2023
1 parent ce0f7b4 commit 98584b7
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 107 deletions.
146 changes: 73 additions & 73 deletions .vscode/launch.json
Expand Up @@ -76,23 +76,23 @@
// "--file-type",
// "excel",

// // "--file-name",
// // "testdata/tasks.xlsx",
// // "--sheet-name",
// // "Ctrl-Q task import 1",
// "--file-name",
// "testdata/tasks.xlsx",
// "--sheet-name",
// "Ctrl-Q task import 1",

// "--import-app",
// "--import-app-sheet-name",
// "App import",
// // "--import-app",
// // "--import-app-sheet-name",
// // "App import",

// // "--qvf-overwrite",
// // "no",

// // "--limit-import-count",
// // "2",

// "--sleep-app-upload",
// "500",
// // "--sleep-app-upload",
// // "500",

// // "--dry-run"
// ]
Expand Down Expand Up @@ -187,82 +187,82 @@
// ------------------------------------
// Import apps from Excel file
// ------------------------------------
"args": [
"app-import",
"--auth-type",
"cert",
"--host",
"192.168.100.109",
"--auth-cert-file",
"./cert/client.pem",
"--auth-cert-key-file",
"./cert/client_key.pem",
"--auth-user-dir",
"LAB",
"--auth-user-id",
"goran",

// "--file-type",
// "excel",

"--file-name",
"testdata/tasks.xlsx",
"--sheet-name",
"App-import",

// "--limit-import-count",
// "2",

"--sleep-app-upload",
"500"

// "--dry-run"
]

// ------------------------------------
// Get task tree
// ------------------------------------
// "args": [
// "task-get",
// "app-import",
// "--auth-type",
// "cert",
// "--host",
// "192.168.100.109",
// // "--auth-cert-file",
// // "./cert/client.pem",
// // "--auth-cert-key-file",
// // "./cert/client_key.pem",
// "--auth-cert-file",
// "./cert/client.pem",
// "--auth-cert-key-file",
// "./cert/client_key.pem",
// "--auth-user-dir",
// "LAB",
// "--auth-user-id",
// "goran",
// // "--task-id",
// // "82bc3e66-c899-4e44-b52f-552145da5ee0",
// "--task-tag",
// "Test data",
// "--output-format",
// "table",
// // "tree",
// // "--tree-icons",
// // "--tree-details",
// // "taskid",
// // "appname",
// // "--task-type",
// // "reload",
// // "ext-program",

// // "--output-dest",
// // "screen",
// // "file",
// // "--output-file-name",
// // "tasks.json",
// // "--output-file-format",
// // "json",

// // "--text-color",
// // "no",
// // "--file-type",
// // "excel",

// "--file-name",
// "testdata/tasks.xlsx",
// "--sheet-name",
// "App-import",

// // "--limit-import-count",
// // "2",

// "--sleep-app-upload",
// "500"

// // "--dry-run"
// ]

// ------------------------------------
// Get task tree
// ------------------------------------
"args": [
"task-get",
// "--auth-type",
// "cert",
"--host",
"192.168.100.109",
// "--auth-cert-file",
// "./cert/client.pem",
// "--auth-cert-key-file",
// "./cert/client_key.pem",
"--auth-user-dir",
"LAB",
"--auth-user-id",
"goran",
// "--task-id",
// "82bc3e66-c899-4e44-b52f-552145da5ee0",
// "--task-tag",
// "Test data",
// "--output-format",
// "table",
// "tree",
// "--tree-icons",
// "--tree-details",
// "taskid",
// "appname",
"--task-type",
"reload",
"ext-program",

// "--output-dest",
// "screen",
// "file",
// "--output-file-name",
// "tasks.json",
// "--output-file-format",
// "json",

// "--text-color",
// "no",
]

// ------------------------------------
// Get reload tasks as table
// ------------------------------------
Expand Down
26 changes: 13 additions & 13 deletions src/lib/app/class_allapps.js
Expand Up @@ -36,7 +36,7 @@ class QlikSenseApps {
logger.error(`QS APP: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`QS APP:\n ${err.stack}`);
}
}
Expand Down Expand Up @@ -143,7 +143,7 @@ class QlikSenseApps {
logger.error(`GET QS APP 2: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`GET QS APP 2:\n ${err.stack}`);
}

Expand Down Expand Up @@ -583,7 +583,7 @@ class QlikSenseApps {
logger.error(`UPDATE UPLOADED APP: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`UPDATE UPLOADED APP:\n ${err.stack}`);
}

Expand Down Expand Up @@ -670,7 +670,7 @@ class QlikSenseApps {
logger.error(`(${appCounter}) PUBLISH APP publish-replace: Failed: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`(${appCounter}) PUBLISH APP publish-replace:\n ${err.stack}`);
}
return { res: false, publishedApp: null };
Expand Down Expand Up @@ -702,7 +702,7 @@ class QlikSenseApps {
logger.error(`(${appCounter}) PUBLISH APP publish-another: Failed: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`(${appCounter}) PUBLISH APP publish-another:\n ${err.stack}`);
}

Expand Down Expand Up @@ -771,7 +771,7 @@ class QlikSenseApps {
logger.error(`(${appCounter}) PUBLISH APP delete-publish: Failed: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`(${appCounter}) PUBLISH APP delete-publish:\n ${err.stack}`);
}

Expand Down Expand Up @@ -813,7 +813,7 @@ class QlikSenseApps {
logger.error(`PUBLISH APP NORMAL: Failed: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`PUBLISH APP NORMAL:\n ${err.stack}`);
}

Expand Down Expand Up @@ -853,7 +853,7 @@ class QlikSenseApps {
logger.error(`PUBLISH APP REPLACE: Failed: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`PUBLISH APP REPLACE:\n ${err.stack}`);
}

Expand Down Expand Up @@ -909,7 +909,7 @@ class QlikSenseApps {
logger.error(`CHECK IF APP EXISTS IN STREAM: Failed: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`CHECK IF APP EXISTS IN STREAM:\n ${err.stack}`);
}

Expand Down Expand Up @@ -959,7 +959,7 @@ class QlikSenseApps {
logger.error(`GET APP IN STREAM: Failed: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`GET APP IN STREAM:\n ${err.stack}`);
}

Expand Down Expand Up @@ -1042,7 +1042,7 @@ class QlikSenseApps {
logger.error(`CHECK IF STREAM EXISTS: Failed: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`CHECK IF STREAM EXISTS:\n ${err.stack}`);
}

Expand Down Expand Up @@ -1146,7 +1146,7 @@ class QlikSenseApps {
logger.error(`CREATE RELOAD TASK IN QSEOW 2: ${err}`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`CREATE RELOAD TASK IN QSEOW 2:\n ${err.stack}`);
}

Expand Down Expand Up @@ -1184,7 +1184,7 @@ class QlikSenseApps {
logger.error(`[${err}] Export app step 1`);

// Show stack trace if available
if (err.stack) {
if (err?.stack) {
logger.error(`[${err}] Export app step 1:\n ${err.stack}`);
}

Expand Down

0 comments on commit 98584b7

Please sign in to comment.