Fix log from orphaned services to not say deleting when it's in dry run.
This commit is contained in:
parent
2f3fc87f12
commit
48074bdc39
@ -57,9 +57,11 @@ for namespace in nomad_req("services"):
|
|||||||
except requests.exceptions.HTTPError as e:
|
except requests.exceptions.HTTPError as e:
|
||||||
if e.response.status_code == 404:
|
if e.response.status_code == 404:
|
||||||
alloc_found = False
|
alloc_found = False
|
||||||
print(
|
message = f"alloc {alloc_id} not found for {service_name}."
|
||||||
f"alloc {alloc_id} not found for {service_name}. Deleting {service_id}"
|
if args.delete:
|
||||||
)
|
message += f" Deleting {service_id}"
|
||||||
|
|
||||||
|
print(message)
|
||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user