Skip to content

Commit

Permalink
Fixing missing initData
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewshell committed Mar 8, 2015
1 parent dc39a13 commit 36e4d0a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 1 addition & 2 deletions services/app-messages.js
Expand Up @@ -12,8 +12,7 @@
},
ping: {
tooRecent: 'Can\'t accept the request because the minimum seconds between pings is %s and you pinged us %s seconds ago.',
readResource: 'The ping was cancelled because there was an error reading the resource at URL %s.',
noSubscriptions: 'No subscriptions found for <a href="%s">resource</a>.'
readResource: 'The ping was cancelled because there was an error reading the resource at URL %s.'
}
},
log: {
Expand Down
2 changes: 1 addition & 1 deletion services/notify-subscribers.js
Expand Up @@ -9,7 +9,7 @@
var apiurl, subscriptions;

if (undefined === data.subscriptions[resourceUrl]) {
return callback(sprintf(appMessage.error.ping.noSubscriptions, resourceUrl));
return callback(null);
}

subscriptions = data.subscriptions[resourceUrl];
Expand Down
2 changes: 2 additions & 0 deletions services/ping.js
Expand Up @@ -4,6 +4,7 @@
var appMessage = require('./app-messages'),
async = require('async'),
crypto = require('crypto'),
initData = require('./init-data'),
initResource = require('./init-resource'),
logEvent = require('./log-event'),
moment = require('moment'),
Expand Down Expand Up @@ -74,6 +75,7 @@

async.waterfall([
function (callback) {
initData(data);
resource = initResource(data, resourceUrl);
callback(null);
},
Expand Down
5 changes: 5 additions & 0 deletions services/please-notify.js
Expand Up @@ -3,6 +3,7 @@

var appMessage = require('./app-messages'),
async = require('async'),
initData = require('./init-data'),
initSubscription = require('./init-subscription'),
logEvent = require('./log-event'),
moment = require('moment'),
Expand Down Expand Up @@ -56,6 +57,10 @@
parts = url.parse(apiurl);

async.waterfall([
function (callback) {
initData(data);
callback(null);
},
function (callback) {
checkresourceUrlStatusCodes(urlList, callback);
},
Expand Down

0 comments on commit 36e4d0a

Please sign in to comment.