Skip to content

Commit c27518e

Browse files
Fix script to pause/unpause DAGs in Composer env (#12563)
1 parent b478927 commit c27518e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

composer/tools/composer_dags.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ def get_list_of_dags(
5858
command_output_parsed.index("DAGS") + 2 : len(command_output_parsed) - 1
5959
]
6060
else:
61+
# Collecting names of DAGs for output
6162
list_of_dags = []
6263
for line in command_output.split("\n"):
63-
if re.compile("[a-z_]+|[a-z]+|[a-z]+|[a-z_]+").findall(line):
64+
if re.compile("^[a-zA-Z].*").findall(line):
6465
list_of_dags.append(line.split()[0])
65-
return list_of_dags[1:-1]
66+
return list_of_dags
6667

6768
@staticmethod
6869
def _run_shell_command_locally_once(

0 commit comments

Comments
 (0)