dburles/meteor-presence — pull request #7 by aaronthorp (2014-04-08 06:27:57+00:00)
Title: Multi-server instance filtering and no remove on startup

enabled two methods depending on environment settings inside `process.env.*`.

```
#export PRESENCE_DONT_CLEAR=true
export PRESENCE_INSTANCE='testing-server-001'
```

- `PRESENCE_DONT_CLEAR` - will just not clear the `Presence` collection, need to manually process it in the code.
- `PRESENCE_INSTANCE` - setting this will allocate a server instance identifier to each `Presence` document connected to that server. On restart it will generate a new `serverInstanceId` and remove any other records from old instances on the specified server only.
- If no environment variables specified, it will run as it currently does.

```
{
instance: {
name: "testing-server-001",
id: "33erfljrkrj3hdkjhd3"
}
}
```