change to progress bar for powershell script
This commit is contained in:
+5
-4
@@ -77,10 +77,11 @@ def index_duration():
|
||||
try:
|
||||
start_timestamp = data[0]['init_timestamp']
|
||||
end_timestamp = data[0]['timestamp']
|
||||
duration = (datetime.strptime(end_timestamp, fmt) - datetime.strptime(start_timestamp, fmt)).total_seconds() / 60
|
||||
return jsonify({"duration": duration, "start_timestamp": start_timestamp, "end_timestamp": end_timestamp})
|
||||
duration = int((datetime.strptime(end_timestamp, fmt) - datetime.strptime(start_timestamp, fmt)).total_seconds() / 60)
|
||||
gpo_link_count = data[0]['gpo_links']
|
||||
return jsonify({"duration": duration, "start_timestamp": start_timestamp, "end_timestamp": end_timestamp, "gpo_links": gpo_link_count})
|
||||
except:
|
||||
return jsonify({'duration': "whoops"})
|
||||
return jsonify({'duration': "whoops", 'error': 'yes, figure it out brah'})
|
||||
|
||||
@app.route("/linked_ous", methods=["GET"])
|
||||
def linked_ous():
|
||||
@@ -139,4 +140,4 @@ def test():
|
||||
return jsonify({"result": "test", "OU_Root": root_ou})
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True, host='{{ api_service_bind_ip }}', port={{ api_service_port }})
|
||||
app.run(debug=False, host='{{ api_service_bind_ip }}', port={{ api_service_port }})
|
||||
Reference in New Issue
Block a user