newwork = work
newres = res = self.compute(work, request.getHeader('X-All-Targets') is not None)
- last_cache_invalidation[request_id].set((thought_work[-1], newwork))
+ reactor.callLater(.01, lambda: last_cache_invalidation[request_id].set((thought_work[-1], newwork)))
request.setHeader('X-Long-Polling', '/long-polling')
request.setHeader('Content-Type', 'application/json')
newwork = work
newres = res = self.compute(work, request.getHeader('X-All-Targets') is not None)
- last_cache_invalidation[request_id].set((thought_work[-1], newwork))
+ reactor.callLater(.01, lambda: last_cache_invalidation[request_id].set((thought_work[-1], newwork)))
return merge(newres.getwork(), res.getwork())
rpc_getwork.takes_request = True