Skip to content

Commit

Permalink
Fix listener with null select in taskworkflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik4949 committed Mar 18, 2024
1 parent 9c336cb commit d20b6ad
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions superduperdb/base/datalayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,15 @@ def _build_task_workflow(
for identifier in listeners:
# TODO reload listener here (with lazy loading)
info = self.metadata.get_component('listener', identifier)
listener_query = Document.decode(info['dict']['select'], None)
select = info['dict']['select']
if not select:
logging.debug(
f'Listener {identifier} was loaded with `None` select, '
f'{identifier} will not be added to refresh jobs.'
)
continue

listener_query = Document.decode(select, None)
listener_select = serializable.Serializable.decode(listener_query)
listener_selects.update({identifier: listener_select})
if listener_select is None:
Expand Down Expand Up @@ -733,7 +741,7 @@ def _build_task_workflow(
)

for identifier in listeners:
listener_select = listener_selects[identifier]
listener_select = listener_selects.get(identifier, None)
if listener_select is None:
continue
if (
Expand Down

0 comments on commit d20b6ad

Please sign in to comment.