You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/12/27 13:52:29 UTC

[airflow-cancel-workflow-runs] 13/44: optimize queries to only pull active statuses

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow-cancel-workflow-runs.git

commit 0802ecf372e2ec66062812f10e6a1a7aa33b8eb3
Author: Jason T. Greene <ja...@redhat.com>
AuthorDate: Tue Feb 18 23:03:34 2020 -0600

    optimize queries to only pull active statuses
---
 dist/index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dist/index.js b/dist/index.js
index 08cf9c8..5505475 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1547,7 +1547,7 @@ function cancelDuplicates(token, selfRunId, owner, repo, workflowId, branch, eve
                 core.info(`Matched ${selfRunId}`);
             }
             if ('completed' === element.status.toString() ||
-                !['push', 'pull_request'].includes(element.event.toString)) {
+                !['push', 'pull_request'].includes(element.event.toString())) {
                 continue;
             }
             // This is a set of one in the non-schedule case, otherwise everything is a candidate