Compare commits
2 Commits
87cbd484ce
...
69ec6d2732
Author | SHA1 | Date |
---|---|---|
Fred Boniface | 69ec6d2732 | |
Fred Boniface | 31f1495833 |
|
@ -6,6 +6,8 @@ def start():
|
|||
if not owlboard_connector.check_connection():
|
||||
print("Exiting")
|
||||
sys.exit(1)
|
||||
else:
|
||||
print("OwlBoard connection successful")
|
||||
working_directory = os.getcwd()
|
||||
print("Working directory: ", working_directory)
|
||||
|
||||
|
@ -26,9 +28,10 @@ def start():
|
|||
|
||||
print(f"Found {len(results)} PIS Codes in documents")
|
||||
missing_pis = pis_find.run(results)
|
||||
print(missing_pis)
|
||||
get_detail = []
|
||||
for code in missing_pis:
|
||||
print(code)
|
||||
print(f"Fetching services with code: {code}")
|
||||
services = owlboard_connector.get_services(code['headcode'], code['date'])
|
||||
get_detail.append({
|
||||
'pis': code['pis'],
|
||||
|
|
|
@ -25,7 +25,7 @@ def check_connection():
|
|||
print("'DGP_OB_UUID' must be set in the environment")
|
||||
return False
|
||||
|
||||
res = requests.get(OB_TEST_URL, headers=HEADERS)
|
||||
res = requests.get(OB_TEST_URL, headers=HEADERS, timeout=10)
|
||||
if res.status_code == 401:
|
||||
print("Error - Unauthorised. The UUID is not valid. STATUS: ", res.status_code, "UUID: ", UUID)
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue