microsoft / ghcrawler

Crawl GitHub APIs and store the discovered orgs, repos, commits, ...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dashboard fails if queue does not exist

jeffmcaffer opened this issue · comments

  • startup the crawler without events
  • startup the dashboard
  • notice that on the crawler machine the stack below shows up every 5 seconds

The fundamental issue here is that QueueSet.getQueue() throws if the queue is not known. It could return null. If it did, we'd have to make sure all the callers check. Alternatively, queues route could try/catch and return a 404.

trackException:
Error: Queue not found: events
    at QueueSet.getQueue (C:\git\ghcrawler\lib\queueSet.js:86:13)
    at CrawlerService.getQueueInfo (C:\git\ghcrawler\lib\crawlerService.js:84:39)
    at c:\git\ospo-ghcrawler\routes\queues.js:20:37
    at next (native)
    at Function.continuer (c:\git\ospo-ghcrawler\node_modules\q\q.js:1278:45)
    at Q.spawn (c:\git\ospo-ghcrawler\node_modules\q\q.js:1305:16)
    at module.exports (c:\git\ospo-ghcrawler\middleware\promiseWrap.js:9:5)
    at Layer.handle [as handle_request] (c:\git\ospo-ghcrawler\node_modules\express\lib\router\layer.js:95:5)
    at next (c:\git\ospo-ghcrawler\node_modules\express\lib\router\route.js:131:13)
    at validate (c:\git\ospo-ghcrawler\middleware\auth.js:16:12)
    at Layer.handle [as handle_request] (c:\git\ospo-ghcrawler\node_modules\express\lib\router\layer.js:95:5)
    at next (c:\git\ospo-ghcrawler\node_modules\express\lib\router\route.js:131:13)
    at Route.dispatch (c:\git\ospo-ghcrawler\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (c:\git\ospo-ghcrawler\node_modules\express\lib\router\layer.js:95:5)
    at c:\git\ospo-ghcrawler\node_modules\express\lib\router\index.js:277:22
    at param (c:\git\ospo-ghcrawler\node_modules\express\lib\router\index.js:349:14)

Resolved by #67