Skip to content

Commit cd01ce2

Browse files
committed
Updated documentation
1 parent 03e7543 commit cd01ce2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

doc/source/introduction.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,39 @@ All these scripts need to run periodically, and one way to do that is through ``
182182

183183
There are other scheduling solutions like ``anacron`` or ``fcron`` that can serve this purpose as well.
184184

185+
On the other hand, there is available a python script named ``splitio.bin.synchronizer`` in order to run as a service instead of a ``cron-job``. For production environment we recomend run it via ``supervisord`` ::
186+
187+
$ /home/user/venv/bin/python -m splitio.bin.synchronizer --help
188+
189+
Usage:
190+
synchronizer [options] <config_file>
191+
synchronizer -h | --help
192+
synchronizer --version
193+
194+
Options:
195+
--splits-refresh-rate=SECONDS The SECONDS rate to fetch Splits definitions [default: 30]
196+
--segments-refresh-rate=SECONDS The SECONDS rate to fetch the Segments keys [default: 30]
197+
--impression-refresh-rate=SECONDS The SECONDS rate to send key impressions [default: 60]
198+
--metrics-refresh-rate=SECONDS The SECONDS rate to send SDK metrics [default: 60]
199+
-h --help Show this screen.
200+
--version Show version.
201+
202+
Configuration file:
203+
The configuration file is a JSON file with the following fields:
204+
205+
{
206+
"apiKey": "YOUR_API_KEY",
207+
"redisHost": "REDIS_DNS_OR_IP",
208+
"redisPort": 6379,
209+
"redisDb": 0
210+
}
211+
212+
213+
Examples:
214+
python -m splitio.bin.synchronizer splitio-config.json
215+
python -m splitio.bin.synchronizer --splits-refresh-rate=10 splitio-config.json
216+
217+
185218
Once the scripts are running, you can access a client using the ``get_redis_client`` function with the ``config_file`` parameter: ::
186219

187220
>>> from splitio import get_redis_client

0 commit comments

Comments
 (0)