Rev | Line | |
---|
[10120] | 1 | 0707f276-b14d-11e2-93a1-8c89a564960d |
---|
| 2 | ------------------------------------------------------------------------ |
---|
| 3 | The value above (and this file) is created and used by the zc.async |
---|
| 4 | package. It is intended to uniquely identify this software instance when |
---|
| 5 | it is used to start a zc.async dispatcher. This allows multiple |
---|
| 6 | dispatchers, each in its own software instance, to connect to a single |
---|
| 7 | database to do work. |
---|
| 8 | |
---|
| 9 | In order to decide where to look for this file (or to create it, if |
---|
| 10 | necessary), the module looks in ``os.environ['ZC_ASYNC_UUID']`` for a |
---|
| 11 | file name. |
---|
| 12 | |
---|
| 13 | If you are using zdaemon (http://pypi.python.org/pypi/zdaemon) to |
---|
| 14 | daemonize your process, you can set this in a zdaemon environment section |
---|
| 15 | of your zdaemon.conf. Supervisor (http://supervisord.org/) also provides |
---|
| 16 | this functionality. Other similar tools probably do as well. |
---|
| 17 | |
---|
| 18 | If the ``ZC_ASYNC_UUID`` is not found in the environment, it will use |
---|
| 19 | ``os.path.join(os.getgwd(), 'uuid.txt')`` as the file name. |
---|
| 20 | |
---|
| 21 | To get a new identifier for this software instance, delete this file, |
---|
| 22 | restart Python, and import zc.async.instanceuuid. This file will be |
---|
| 23 | recreated with a new value. |
---|
Note: See
TracBrowser for help on using the repository browser.