Skip to content

Instantly share code, notes, and snippets.

@aandvalenzuela
Created February 24, 2023 15:18
Show Gist options
  • Select an option

  • Save aandvalenzuela/3b7abe487650fa912140a9a05ce78ff9 to your computer and use it in GitHub Desktop.

Select an option

Save aandvalenzuela/3b7abe487650fa912140a9a05ce78ff9 to your computer and use it in GitHub Desktop.
labels = element["why"].encode('utf-8')
print("==> LABELS: ", labels)
if "already in progress" in labels:
reason = "concurrent builds not allowed"
elif "Waiting for next available executor on" in labels:
reason = labels.split(" on ")[1].decode('utf8').encode('ascii', errors='ignore')
else:
reason = "other"
print("[REASON]: ", reason)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment