push.run (collection.cfg setting)
Controls if a Push collection is allowed to run in any mode or not. This option is useful when it is necessary to edit the live directory of a Push collection especially in a multi server setup.
When set to
false, a previously running push collection will be stopped within a few seconds and prevented from restarting.
Once the push collection is not running:
- Most API calls for the collection will be rejected including add/delete document calls, make new snapshot, etc.
- Existing snapshots may still be listed and have their contents read.
- Modifications to the live push directory, such as moving the content of a snapshot back into the live directory, may be safely performed.
- If the collection is in slave mode, it will stop syncing from master.
- The collection will prevent slaves from pulling new data from it.
Before making changes to the live directory, you should confirm via the API that the push collection has stopped running or syncing:
Also verify that API calls do not start the collection, for example use the GET document API call:
The API should not return with a 200 or 404 and should return a message containing:
Push can not be started because 'push.run' is set false.
By default Push collections are allowed to run.
In case the live directory needs to be edited for example to restore a snapshot the push collection can be told not to run:
When set to
false, queries will still be allowed to run against the collection.