Skip to content

Commit

Permalink
Ensure busy counter is always reset (#6698)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Apr 9, 2024
1 parent ee07ee4 commit b297d20
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This micro-release fixes a number of regressions and other bugs introduced in re
- Avoid unnecessary rescroll on Column ([#6666](https://github.com/holoviz/panel/pull/6666))
- Fix dynamically updating description tooltips ([#6676](https://github.com/holoviz/panel/pull/6676))
- Ensure Perspective is fully loaded before attempting render ([#6689](https://github.com/holoviz/panel/pull/6689)))
- Ensure busy indicators are always reset ([#6698](https://github.com/holoviz/panel/pull/6698))

### Styling

Expand Down
1 change: 1 addition & 0 deletions doc/about/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ This micro-release fixes a number of regressions and other bugs introduced in re
- Avoid unnecessary rescroll on Column ([#6666](https://github.com/holoviz/panel/pull/6666))
- Fix dynamically updating description tooltips ([#6676](https://github.com/holoviz/panel/pull/6676))
- Ensure Perspective is fully loaded before attempting render ([#6689](https://github.com/holoviz/panel/pull/6689)))
- Ensure busy indicators are always reset ([#6698](https://github.com/holoviz/panel/pull/6698))

### Styling

Expand Down
20 changes: 10 additions & 10 deletions panel/reactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,13 @@ def _process_events(self, events: Dict[str, Any]) -> None:
if any(e for e in events if e not in self._busy__ignore):
with edit_readonly(state):
state._busy_counter += 1
events = self._process_property_change(events)
params = self._process_property_change(dict(events))
try:
with edit_readonly(self):
self_events = {k: v for k, v in events.items() if '.' not in k}
with _syncing(self, list(self_events)):
self.param.update(**self_events)
for k, v in self_events.items():
self_params = {k: v for k, v in params.items() if '.' not in k}
with _syncing(self, list(self_params)):
self.param.update(**self_params)
for k, v in params.items():
if '.' not in k:
continue
*subpath, p = k.split('.')
Expand All @@ -397,13 +397,13 @@ def _process_events(self, events: Dict[str, Any]) -> None:
with _syncing(obj, [p]):
obj.param.update(**{p: v})
except Exception:
if len(events)>1:
msg_end = f" changing properties {pformat(events)} \n"
elif len(events)==1:
msg_end = f" changing property {pformat(events)} \n"
if len(params) > 1:
msg_end = f"changing properties {pformat(params)} \n"
elif len(params) == 1:
msg_end = f"changing property {pformat(params)} \n"
else:
msg_end = "\n"
log.exception(f'Callback failed for object named "{self.name}"{msg_end}')
log.exception(f'Callback failed for object named {self.name!r} {msg_end}')
raise
finally:
self._log('finished processing events %s', events)
Expand Down

0 comments on commit b297d20

Please sign in to comment.