Merge ~ines-almeida/txpkgupload:reconfigure-charm-on-config-change into txpkgupload:master

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: baaf59158951f51fa913362e47885e37f6b432a5
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/txpkgupload:reconfigure-charm-on-config-change
Merge into: txpkgupload:master
Diff against target: 16 lines (+5/-0)
1 file modified
charm/txpkgupload/reactive/txpkgupload.py (+5/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+453641@code.launchpad.net

Commit message

charm: force charm to reconfigure when config changes

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charm/txpkgupload/reactive/txpkgupload.py b/charm/txpkgupload/reactive/txpkgupload.py
2index d219464..8c76b7e 100644
3--- a/charm/txpkgupload/reactive/txpkgupload.py
4+++ b/charm/txpkgupload/reactive/txpkgupload.py
5@@ -186,6 +186,11 @@ def deconfigure():
6 clear_flag("service.configured")
7
8
9+@when("config.changed")
10+def config_changed():
11+ clear_flag("service.configured")
12+
13+
14 @when("loadbalancer.available", "service.configured")
15 @when_not("txpkgupload.loadbalancer.configured")
16 def configure_loadbalancer():

Subscribers

People subscribed via source and target branches

to all changes: