You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
16
16
### Changed
17
17
18
+
- Improve handling of plugin configuration options. Plugin options can now also be in stoq.cfg. (Thanks for feedback @chemberger!)
19
+
- Set default precendence for plugin configuration options to be 1) `plugin_opts` when instantiating `Stoq`, 2) `stoq.cfg`, 3) Plugin config file (Thanks for feedback @chemberger!)
18
20
- Make formatted exceptions more legible in results
The recommended location for storing static plugin configuration options is in `stoq.cfg`. The reason for this
64
+
if all plugin options defined in the plugin's `.stoq` file will be overwritten when the plugin is upgraded.
65
+
66
+
To define plugin options in `stoq.cfg` simply add a section header of the plugin name, then define the plugin options::
67
+
68
+
[dirmon]
69
+
source_dir = /tmp/monitor
70
+
71
+
72
+
.. _pluginconfigpluginstoq:
73
+
74
+
Plugin .stoq configuration file
75
+
--------------------------------
76
+
77
+
Each plugin must have a ``.stoq`` configuration file. The configuration file resides in
23
78
the same directory as the plugin module. The plugin's configuration file allows for
24
79
configuring a plugin with default or static settings. The configuration file is a standard
25
80
YAML file and is parsed using the ``configparser`` module. The following is an example
@@ -55,37 +110,14 @@ Additionally, some optional settings may be defined::
55
110
* **options**
56
111
- **min_stoq_version**: Minimum version of stoQ required to work properly. If the version of `stoQ` is less than the version defined, a warning will be raised.
57
112
58
-
Custom settings may be added as required for plugins, but the plugins must be configured to
59
-
load and set them. For example, our configuration file may be::
0 commit comments