← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Ines Almeida has proposed merging ~ines-almeida/txpkgupload:reconfigure-charm-on-config-change into txpkgupload:master.

Commit message:
charm: force charm to reconfigure when config changes

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/txpkgupload/+git/txpkgupload/+merge/453641
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/txpkgupload:reconfigure-charm-on-config-change into txpkgupload:master.
diff --git a/charm/txpkgupload/reactive/txpkgupload.py b/charm/txpkgupload/reactive/txpkgupload.py
index d219464..8c76b7e 100644
--- a/charm/txpkgupload/reactive/txpkgupload.py
+++ b/charm/txpkgupload/reactive/txpkgupload.py
@@ -186,6 +186,11 @@ def deconfigure():
     clear_flag("service.configured")
 
 
+@when("config.changed")
+def config_changed():
+    clear_flag("service.configured")
+
+
 @when("loadbalancer.available", "service.configured")
 @when_not("txpkgupload.loadbalancer.configured")
 def configure_loadbalancer():