{"size": 444, "ext": "js", "max_stars_repo_path": "lib/workers/whitelist.js", "max_stars_repo_name": "52North/deu-geoviewer-proxy", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/workers/whitelist.js", "max_issues_repo_name": "52North/deu-geoviewer-proxy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/workers/whitelist.js", "max_forks_repo_name": "52North/deu-geoviewer-proxy", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 29.6, "max_line_length": 78, "alphanum_fraction": 0.6621621622}
var config = require("../config");
var WhitelistManager = require("../whitelist").Manager;
var log = require("../logging")("whitelist-worker");

module.exports = function() {
  log.info("Starting whitelist Worker...");
  WhitelistManager.create(config.whitelist).on("update", function(whitelist) {
    log.trace("Sending whitelist to master");
    process.send({
      cmd: "whitelist.update",
      whitelist: whitelist.get()
    });
  });
};
