updated logging
This commit is contained in:
parent
36b67cd116
commit
67319ab16c
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
*.json
|
*.json
|
||||||
*.csv
|
*.csv
|
||||||
*.toml
|
*.toml
|
||||||
|
.vscode/
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
@ -3,8 +3,9 @@ def build_cont_list(obj, hypercare_containers):
|
|||||||
cont_list = []
|
cont_list = []
|
||||||
for i, c in enumerate(obj):
|
for i, c in enumerate(obj):
|
||||||
if c["State"].lower() != "running":
|
if c["State"].lower() != "running":
|
||||||
if c["Names"][0].lstrip("/") in hypercare_containers:
|
continue
|
||||||
cont_list.append(c)
|
if c["Names"][0].lstrip("/") in hypercare_containers:
|
||||||
|
cont_list.append(c)
|
||||||
return cont_list
|
return cont_list
|
||||||
|
|
||||||
def build_full_cont_list(obj, hypercare_containers):
|
def build_full_cont_list(obj, hypercare_containers):
|
||||||
|
2
crane.py
2
crane.py
@ -54,7 +54,7 @@ class Crn:
|
|||||||
self.tl.debug('Building container list.')
|
self.tl.debug('Building container list.')
|
||||||
self.process_cont_list_response = process_cont_list(self.cont_list, c_start_container, self.cc, self.host, self.port, self.jwt, self.endpoint)
|
self.process_cont_list_response = process_cont_list(self.cont_list, c_start_container, self.cc, self.host, self.port, self.jwt, self.endpoint)
|
||||||
if self.process_cont_list_response:
|
if self.process_cont_list_response:
|
||||||
self.tl.warn(f'Started: [{self.process_cont_list_response}]')
|
self.tl.warning(f'Started: [{self.process_cont_list_response}]')
|
||||||
|
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
self.tl.exception(e)
|
self.tl.exception(e)
|
||||||
|
@ -9,4 +9,4 @@ po_token = config["pushover"]["po_token"]
|
|||||||
|
|
||||||
message = "hello"
|
message = "hello"
|
||||||
|
|
||||||
pushover.Pushover(po_token).message(po_key, message, title="--- crane summary ---")
|
# pushover.Pushover(po_token).message(po_key, message, title="--- crane summary ---")
|
Loading…
x
Reference in New Issue
Block a user