@@ -34,7 +34,7 @@ class RecordingImportError(RuntimeError):
3434 pass
3535
3636
37- def playback_xml (playback : model .PlaybackFormat ) -> ETree :
37+ def format_xml (playback : model .PlaybackFormat ) -> ETree :
3838 orig = lxml .etree .fromstring (playback .xml )
3939 playback_domain = config .PLAYBACK_DOMAIN .format (
4040 DOMAIN = config .DOMAIN , REALM = playback .recording .tenant .realm
@@ -382,7 +382,6 @@ def _extract():
382382 self ._breakpoint ()
383383 self ._log (f"Extracting: { self .source } " )
384384 with tarfile .open (self .source ) as tar :
385- self ._log (f"Opened: { tar } " )
386385 tar .extractall (self .task_dir , filter = tarfile .data_filter )
387386 self ._log (f"Extracted: { self .source } " )
388387
@@ -526,15 +525,17 @@ async def _process_one(self, metafile: Path):
526525 if not format_created :
527526 pass # TODO: Merge existing with new format?
528527
529- # Each new format triggers the recording-ready callbacks again,
530- # just like BBB does it. We never know when the last format
531- # arrived, so we keep the callbacks around for a while.
532- if format_created and "bbblb-uuid" in record .meta :
528+ # The recording-ready callbacks are triggered for each format,
529+ # and may be triggered again if a format is imported multiple
530+ # times. That#s the way BBB behaves and most front-ends expect.
531+ # We never know when the last import happend, so we keep the
532+ # callbacks around for a while. (TODO)
533+ if "bbblb-uuid" in record .meta :
533534 async with model .session () as session :
534535 stmt = model .Callback .select (
535536 uuid = record .meta ["bbblb-uuid" ], type = model .CALLBACK_TYPE_REC
536537 )
537- callbacks = (await session .execute (stmt )).scalars ()
538+ callbacks = (await session .execute (stmt )).scalars (). all ()
538539
539540 # Fire callbacks in the background, they may take a while to
540541 # complete if the front-end is unresponsive.
0 commit comments