updated urls
This commit is contained in:
@@ -34,7 +34,7 @@ rec_err_state_log_stream_handler.setLevel(logging.WARNING)
|
||||
logger.addHandler(rec_err_state_log_stream_handler)
|
||||
#logger.addHandler(mem_handler)
|
||||
|
||||
base_url = "https://opencast.bibliothek.kit.edu"
|
||||
base_url = "https://oc-bib-admin.bibliothek.kit.edu"
|
||||
|
||||
session = requests.session()
|
||||
session.auth = HTTPBasicAuth(Config.OPENCAST_USER, Config.OPENCAST_PW)
|
||||
@@ -66,6 +66,7 @@ def get_calender(rec_id):
|
||||
url = get_service_url('org.opencastproject.scheduler') + "/calendars"
|
||||
res = session.get(url, params=params)
|
||||
if res.ok:
|
||||
logger.debug(res.text)
|
||||
return Calendar(res.text)
|
||||
|
||||
|
||||
@@ -113,6 +114,9 @@ def check_capture_agent_state(a: dict):
|
||||
logger.info("{} has entry in Calender and should therefore be recording... checking now!".format(a['name']))
|
||||
if a['state'] == "capturing":
|
||||
recorder_info = get_recorder_by_name(a['name'])
|
||||
if recorder_info is None:
|
||||
logger.error("FATAL: Could not find recorder info for {}!".format(a['name']))
|
||||
return
|
||||
try:
|
||||
rec = get_recorder_adapter(recorder_info)
|
||||
if rec.is_recording():
|
||||
@@ -131,6 +135,9 @@ def check_capture_agent_state(a: dict):
|
||||
logger.error("FATAL: {} is not in capturing state...but should be!!".format(a['name']))
|
||||
else:
|
||||
recorder_info = get_recorder_by_name(a['name'])
|
||||
if recorder_info is None:
|
||||
logger.error("FATAL: Could not find recorder info for {}!".format(a['name']))
|
||||
return
|
||||
try:
|
||||
rec = get_recorder_adapter(recorder_info)
|
||||
if rec.is_recording():
|
||||
@@ -147,7 +154,11 @@ def check_capture_agent_state(a: dict):
|
||||
|
||||
|
||||
def ping_capture_agent(a: dict):
|
||||
recorder_ip = get_recorder_by_name(a['name'])['ip']
|
||||
logger.debug(get_recorder_by_name(a['name']))
|
||||
recorder = get_recorder_by_name(a['name'])
|
||||
if recorder is None:
|
||||
return
|
||||
recorder_ip = recorder['ip']
|
||||
try:
|
||||
response = subprocess.check_call(
|
||||
['ping', '-W', '10', '-c', '2', recorder_ip],
|
||||
|
||||
Reference in New Issue
Block a user