Skip to content

Commit

Permalink
Only show disable warning on tronctl disable (#990)
Browse files Browse the repository at this point in the history
I'm not sure I was thinking here since this ended up unconditionally
printing the disable warning - but we can chalk this up to an
intentional PR campaign to warn folks and only show the warnings on
tronctl disable from now on :p
  • Loading branch information
nemacysts committed Jul 11, 2024
1 parent ff099ba commit a7ef2bd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/tronctl
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,12 @@ def control_objects(args: argparse.Namespace):
yield request(urljoin(args.server, tron_id.url), data)
# NOTE: ideally we'd add this message in the JobController handle_command() function, but having the API return terminal escape codes
# sounds like a bad idea, so we're doing it here instead
print(
warning_output(
"WARNING: jobs disabled with tronctl disable are *NOT* guaranteed to stay disabled. You must disable the job in yelpsoa-configs to guarantee it will not be re-enabled."
if args.command == "disable":
print(
warning_output(
"WARNING: jobs disabled with tronctl disable are *NOT* guaranteed to stay disabled. You must disable the job in yelpsoa-configs to guarantee it will not be re-enabled."
)
)
)


def retry(args):
Expand Down

0 comments on commit a7ef2bd

Please sign in to comment.