 						else
 							hostJobs[c.node.name].lastseen = ~~((new Date).getTime() / 1000)
 						syncJobs c.node.name, c.jobIds
-						datalog.gauge 'task_processing', Object.keys(hostJobs[c.node.name]).length, [ 'worker:' + c.node.name ]
+						datalog.gauge 'task_processing', c.jobIds.length, [ 'worker:' + c.node.name ] if c.jobIds? and Array.isArray(c.jobIds)
 					if c.id
 						switch c.status
 							when 2 # job taken

						#console.log output.join(" | "), output.length,".--"
						#process.stdout.clearLine()
						output.push "zmq : " + s_wk._zmq.pending
						if canprogress
							process.stdout.cursorTo(60)
							process.stdout.write output.join(" | ")

							when 3 # job finished
								if c.error
									# error on the job
									jobItem = findinque(c.id)
									if jobItem._status is "working" and jobItem._takenby is c.node.name
										jobItem._status = "errored"
										jobItem._lastchange = ~~((new Date).getTime() / 1000)
										jobItem.error = c.error
									console.log ':(', (if c.node then c.node.name else '?'), c.id, c.error.message
									datalog.legauge 'task_error', c.node.name
									if config.errorlog isnt false #error log
