Skip to content

push.run (collection.cfg setting)

Description

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:

  • GET push-api/v1/collections/<collection>/state
  • GET push-api/v1/sync/collections/<collection>/state

Also verify that API calls do not start the collection, for example use the GET document API call:

GET push-api/v2/collections/<collection>/documents?key=http%3A%2F%2Fany.url%2F

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.

Default value

By default Push collections are allowed to run.

push.run=true

Examples

In case the live directory needs to be edited for example to restore a snapshot the push collection can be told not to run:

push.run=false

Caveats

When set to false, queries will still be allowed to run against the collection.

See also

top

Funnelback logo
v15.16.0