 					
 					# Inconsistency checks for zmq queue
 
-					if forceQueuereSync or ( ((~~((new Date).getTime() / 1000)) - dirtyqueue > zmqWorking) and status_c.onqueue? and status_c.onqueue isnt s_wk._zmq.pending )
-						console.log "Inconsistent Queue", status_c.onqueue, s_wk._zmq.pending, "forced", forceQueuereSync
-						zmqids = []
-						for item,ix in s_wk._outgoing
-							lid = JSON.parse(item[0].toString('utf-8'))._id
-							zmqids.push([lid,ix])
-						# On zmq but not on que
-						notonque = []
-						for item in zmqids
-							notonque.push(item[1]) if findinque(item[0])._status isnt "onqueue" # not on que
-						# Duplicates
-						dups = []
-						for item,ix in zmqids
-							for inItem,inIx in zmqids
-								dups.push(item[1]) if ix isnt inIx and item[0] is inItem[1] # duplicates
-						console.log "NotOnQue", notonque.length, "Dups",dups.length
-						todelete = notonque.concat(dups)
-						if todelete.length isnt 0
-							console.log "Removing", todelete.length,"items from zmqQueue", todelete
-							s_wk._outgoing = s_wk._outgoing.filter (obj,ix)->
-								return false if todelete.indexOf(ix) isnt -1
-								return true
-						# on Que but not on zmq
-						reenques = 0
-						for item in workque
-							if item._status is "onqueue"
-								found = false
-								for zItem in zmqids
-									found = true if zItem[0] is item._id
-								if !found
-									reenques++
-									item._status = "tosend"
-									item._lastchange = ~~((new Date).getTime() / 1000)
-						console.log "Reenqued", reenques,"jobs"
-						forceQueuereSync = false
+					if ((~~((new Date).getTime() / 1000)) - dirtyqueue > zmqWorking) and status_c.onqueue? and status_c.onqueue isnt s_wk._zmq.pending
+						console.log "Resync of Queue", status_c.onqueue, s_wk._zmq.pending
+						resyncQueue()
 					setImmediate -> next()
 			,(err)->
 				#it will never stop

									currentjob._otherhost[host] = true
								else
									console.log jobId,currentjob._takenby, "->",host if currentjob._takenby?
									if currentjob._status is "onqueue" then forceQueuereSync = true
									currentjob._takenby = host
									currentjob._status = "working"
									currentjob._lastchange = ~~((new Date).getTime() / 1000)

									doc._status = "tosend"
									doc._lastchange = ~~((new Date).getTime() / 1000)
									index = findplace(doc._id)
									if workque[index]._status is "fetching"
										workque[index] = doc
									else
										#it was a gosth job
