Minor Changes to Quality of Life Update

This commit is contained in:
brotoskyj
2025-09-03 11:53:59 -04:00
parent 2f47ee7e44
commit c428a4a989
+2 -2
View File
@@ -35,7 +35,7 @@ def pullPolicyExechistories(url, policiesnames, days, outputjson: bool):
headers = {"X-APIKey": os.getenv('APIKEY')}
checkpoint = str(skipback(days))
json_output = {'error': 'Success', 'response': {'exechistories': []}}
with tqdm.tqdm(total=100, desc="Total Percentage Complete: ") as pbar:
with tqdm.tqdm(total=100, desc=f"Total of {policiesnames} Complete: ") as pbar:
while True:
json_response_data = checkpoint_stomper(checkpoint, url, policiesnames, headers)
histories = json_response_data['response']['exechistories']
@@ -73,7 +73,7 @@ def pullPolicyExechistories(url, policiesnames, days, outputjson: bool):
date_diff = datetime.date.today() - datetime.datetime.strptime(item['datetime'].replace(' +0000 UTC', ''), '%Y-%m-%dT%H:%M:%SZ').date()
percentage_diff = ((days - date_diff.days) / 60) * 100
pbar.n = round(percentage_diff)
pbar.set_description_str(f"Total Percentage Complete: ({percentage_diff:.1f}%)")
pbar.set_description_str(f"Total of {policiesnames} Complete: ({percentage_diff:.1f}%)")
pbar.refresh
with open(file_path, 'r') as file:
final_output = json.load(file)