Schedule events in Opencast from the scheduler app
This PR implements the opencast.update_state(state)
function. Specifically The current opencast events are retrieved and compared to the local events in the state and opencast events are created/updated/deleted such that they match the local events.
The PR is incomplete in the ways listed below. However, given the time constraints on this task, I thought it better to open what I've done so far to review while I continue to work on the remaining points:
- The
_create_opencast_event()
isn't currently working (throws a 400). This maybe a subtlety in theaiohttp.FormData
class or I may just have gotten the request slightly wrong. This is critical for the demo and any help with this will be appreciated. - The 'update event' api call is failing - so currently I'm deleting and recreating the event - which is far from ideal.
- I haven't written any unit tests yet.
- I'm not paging the retrieved opencast events (not critical for the demo)
- It might be possible to create own metadata flavor and thus may be preferable to store our
source_id
there.