Created
September 4, 2025 09:57
-
-
Save dimaqq/d8b55285b08b872327041f44bf742895 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def reconcile(self, event: Any): | |
| secret = self.model.get_secret(...) | |
| passwd = secret.get_content(refresh=True) | |
| reldata = self.foo_requirer.get_foobar() | |
| try: | |
| self.workload.reconfigure_and_restart( | |
| redata, | |
| passwd, | |
| ... | |
| ) | |
| self.unit.status = ops.ActiveStatus() | |
| except NotSafeToRestartWorkloadNow: | |
| self.unit.status = ops.ActiveStatus("Degraded: will restart workload later") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment