Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Bing API key needs to be requested directly from Microsoft on the Azure Marketplace. It can then be configured in the section bing.

KeyUsageDefault
account_keyThe Bing News API key.(No default value)
root_urlAPI endpoint for the Bing News API.https://api.datamarket.azure.com/Bing/Search/

Source Manager

The source manager implements the polling behavior. The behavior is configured in the two sections source_manager and source_manager_web (for news and web sources respectively) with the following keys.

All values are JSON-encoded time delta objects and can contain the keys seconds, minutes, hours, days, weeks.

KeyUsageDefault for News
check_delayHow long after errors the source is polled again. The delay is exponentially increased with each error.

{"minutes": 1}

max_error_delayThe maximum delay after errors.{"days": 3}
success_delay

Delay when the Bing API request succeeded.

When no new items were found, this interval is increased with each request. This ensures that sources with very low result frequency don't use up too much of the API quota.

{"minutes": 15}
max_success_delayThe maximum delay when no new items were found.

{"hours": 12}

To avoid thundering herd problems, there is some randomness applied to these values (+/- one fourth of the delay).

...

Code Block
languagetext
[source_manager]
check_delay = {"minutes": 1}
max_error_delay = {"days": 3}
success_delay = {"minutes": 15}
max_success_delay = {"hours": 12}

[source_manager_web]
check_delay = {"days": 1}
max_error_delay = {"days": 7}
success_delay = {"days": 1}
max_success_delay = {"days": 3} 

Securing the Bing Provider

The Bing Provider relies on MySql Server to store information about searches and search histories. To connections to MySql rely on a MySql user called bing configured with a default password. To modify the password, please follow these steps.

  1. Generate a password. Lets refer to the generated password as $PASSWORD
  2. First configure the password in /etc/squirro/bing.ini like so:

    Code Block
    title/etc/squirro/bing.ini
    [bing]
    db = mysql://bing:$PASSWORD@localhost/bing?charset=utf8
  3. Next you would modify the password within MySql server:

    Code Block
    languagebash
    sudo su
    mysql -e "SET PASSWORD FOR bing = PASSWORD(\"$PASSWORD\")"
  4. Restart the Squirro Bing Provider service like so;

    Code Block
    languagebash
    service sqbingd restart

Done.