Merge pull request #1708 from YunoHost/enh-restore-hook

[enh] Add post_app_restore hook
This commit is contained in:
Alexandre Aubin 2023-10-30 14:10:43 +01:00 committed by GitHub
commit 24cb534719
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1554,6 +1554,12 @@ class RestoreManager:
if not restore_failed:
self.targets.set_result("apps", app_instance_name, "Success")
operation_logger.success()
# Call post_app_restore hook
env_dict = _make_environment_for_app_script(
app_instance_name
)
hook_callback("post_app_restore", env=env_dict)
else:
self.targets.set_result("apps", app_instance_name, "Error")