hburgund/roundware-server — pull request #185 by eosrei (2014-11-06 00:40:29+00:00)
Title: Implementing Audio Timeout Banlist

Many changes, but also many new tests. See commit messages for details of changes.

**Original functionality:**
* All assets are added to the `far`(all) list on startup.
* On move listener,
* If a `far` asset is nearby it is moved to `nearby_unplayed`, otherwise it is left in `far`.
* If a `nearby_unplayed` asset is nearby it is left in `nearby_unplayed`, otherwise it is moved to `far`.
* If a `nearby_played` asset is nearby it is left in `nearby_played`, other it is moved to `far`.
* Assets move from `nearby_unplayed` to `nearby_played` when played.

Code here: https://github.com/hburgund/roundware-server/blob/ddef8df1a252b9bef08ddcf5986bf1da123c4947/roundwared/recording_collection.py#L155

**New functionality:**
* All assets are added to the `all` list on startup.
* On move listener,
* All expired timeout assets are removed from the `banned_timeout` list. (currently time since start, not time since end)
* All not-nearby assets are removed from the `banned_nearby` list.
* All assets not in `banned_timeout` and not in `banned_nearby` which are nearby are added to `unplayed`.
* Assets are *added* to `banned_timeout` and `banned_nearby` when played.

This new feature adds a new Django configuration setting (common/dev/test).py
```
# Number of seconds to ban an asset/recording from playing again
BANNED_TIMEOUT_LIMIT = 1800
```
Default is 30 minutes for production, 90 seconds for dev, and 3 seconds for testing.