File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,6 @@ def _on_database_created(self, _) -> None:
302
302
return
303
303
if self .unit .is_leader ():
304
304
self .app_peer_data ["database-start" ] = "true"
305
- self .unit .status = ActiveStatus ()
306
305
307
306
def _on_endpoints_changed (self , _ ) -> None :
308
307
"""Handle the database endpoints changed event."""
@@ -320,6 +319,8 @@ def _on_peer_relation_changed(self, _) -> None:
320
319
# flag should be picked up just once
321
320
self .app_peer_data ["database-start" ] = "done"
322
321
322
+ self .unit .status = ActiveStatus ()
323
+
323
324
def _on_relation_broken (self , _ ) -> None :
324
325
"""Handle the database relation broken event."""
325
326
self ._stop_continuous_writes ()
Original file line number Diff line number Diff line change @@ -62,9 +62,6 @@ def _on_relation_joined(self, event):
62
62
# Set database-start to true to trigger common post relation tasks
63
63
self .charm .app_peer_data ["database-start" ] = "true"
64
64
65
- # set charm status
66
- self .charm .unit .status = ActiveStatus ()
67
-
68
65
def _on_relation_broken (self , _ ):
69
66
if not self .charm .unit .is_leader ():
70
67
# only leader handles the relation data
You can’t perform that action at this time.
0 commit comments