diff --git a/scripts/evict-inactive.js b/scripts/evict-inactive.js index 366640ce6..b37272e0a 100644 --- a/scripts/evict-inactive.js +++ b/scripts/evict-inactive.js @@ -284,7 +284,7 @@ nThen(function (w) { }; store.listChannels(handler, w(done)); -}).nThen(function (w) { +}).nThen(function () { Log.info("EVICT_TIME_TO_RUN_SCRIPT", msSinceStart()); }).nThen(function () { // the store will keep this script running if you don't shut it down diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 6e9d1e619..7244b0cb7 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -517,6 +517,18 @@ define([ /////////////////////// Store //////////////////////////////////// ////////////////////////////////////////////////////////////////// + var getAllStores = function () { + var stores = [store]; + var teamModule = store.modules['team']; + if (teamModule) { + var teams = teamModule.getTeams().map(function (id) { + return teamModule.getTeam(id); + }); + Array.prototype.push.apply(stores, teams); + } + return stores; + }; + // Get or create the user color for the cursor position var getRandomColor = function () { var getColor = function () { @@ -602,7 +614,6 @@ define([ s.manager.addPad(data.path, pad, function (e) { if (e) { return void cb({error: e}); } - var send = data.teamId ? s.sendEvent : sendDriveEvent; // Send a CHANGE events to all the teams because we may have just // added a pad to a shared folder stored in multiple teams getAllStores().forEach(function (_s) { @@ -826,17 +837,6 @@ define([ * - attr (Array) * - value (String) */ - var getAllStores = function () { - var stores = [store]; - var teamModule = store.modules['team']; - if (teamModule) { - var teams = teamModule.getTeams().map(function (id) { - return teamModule.getTeam(id); - }); - Array.prototype.push.apply(stores, teams); - } - return stores; - }; Store.setPadAttribute = function (clientId, data, cb) { nThen(function (waitFor) { getAllStores().forEach(function (s) {