added timeout and logging for tpdsworker queing via http

This commit is contained in:
Henry Oswald 2015-06-23 11:19:23 +01:00
parent b83fe4dcf9
commit 84bf0dd9a3

View file

@ -26,10 +26,13 @@ module.exports = TpdsUpdateSender =
method:method method:method
job:job job:job
method:"post" method:"post"
timeout: (5 * 1000)
request opts, (err)-> request opts, (err)->
if err? if err?
logger.err err:err, "error queuing something in the tpdsworker"
callback(err) callback(err)
else else
logger.log group:group, "successfully queued up job for tpdsworker"
callback() callback()
_addEntity: (options, callback = (err)->)-> _addEntity: (options, callback = (err)->)->