Skip to content

Commit

Permalink
that callback was silly
Browse files Browse the repository at this point in the history
  • Loading branch information
Swizec committed Dec 19, 2010
1 parent 8a5cec0 commit 9ed72cc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions worker.js
Expand Up @@ -14,9 +14,7 @@ exports.listen = function (queue, worker, callback) {
var BUSY = false;
var emitter = new EventEmitter();

var notify_client = function (task, callback) {
callback = callback || function () {}

var notify_client = function (task) {
try {
var url = urllib.parse(task.callback);
var body = JSON.stringify(task);
Expand All @@ -34,12 +32,9 @@ exports.listen = function (queue, worker, callback) {
}else{
logging.info("Served task "+task.id);
}

callback(null, 'meow');
});
}catch (e) {
logging.warning("Client callback unreachable "+task.id);
callback(null, 'meow');
}
};

Expand Down

0 comments on commit 9ed72cc

Please sign in to comment.