{"action":"opened","issue":{"url":"https://api.github.com/repos/onefinestay/nameko/issues/347","repository_url":"https://api.github.com/repos/onefinestay/nameko","labels_url":"https://api.github.com/repos/onefinestay/nameko/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/onefinestay/nameko/issues/347/comments","events_url":"https://api.github.com/repos/onefinestay/nameko/issues/347/events","html_url":"https://github.com/onefinestay/nameko/issues/347","id":171587499,"number":347,"title":"Scrapy Script inside Container ends up with Issues","user":{"login":"kgrvamsi","id":1199031,"avatar_url":"https://avatars.githubusercontent.com/u/1199031?v=3","gravatar_id":"","url":"https://api.github.com/users/kgrvamsi","html_url":"https://github.com/kgrvamsi","followers_url":"https://api.github.com/users/kgrvamsi/followers","following_url":"https://api.github.com/users/kgrvamsi/following{/other_user}","gists_url":"https://api.github.com/users/kgrvamsi/gists{/gist_id}","starred_url":"https://api.github.com/users/kgrvamsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgrvamsi/subscriptions","organizations_url":"https://api.github.com/users/kgrvamsi/orgs","repos_url":"https://api.github.com/users/kgrvamsi/repos","events_url":"https://api.github.com/users/kgrvamsi/events{/privacy}","received_events_url":"https://api.github.com/users/kgrvamsi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-17T06:57:02Z","updated_at":"2016-08-17T06:57:02Z","closed_at":null,"body":"I'm trying to run the Scrapy API crawler class inside the nameko container either by @time or @consume but the behaviour is that first time the scrapy crawler service executes fine but the next time it ends up with the following issues\r\n\r\n```\r\nerror handling worker <WorkerContext [watchmen.random_checking] at 0x7f9e1518c1d0>: \r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/nameko/containers.py\", line 414, in _run_worker\r\n    result = method(*worker_ctx.args, **worker_ctx.kwargs)\r\n  File \"./updater.py\", line 73, in random_checking\r\n    reactor.run()\r\n  File \"/usr/local/lib/python2.7/dist-packages/twisted/internet/base.py\", line 1193, in run\r\n    self.startRunning(installSignalHandlers=installSignalHandlers)\r\n  File \"/usr/local/lib/python2.7/dist-packages/twisted/internet/base.py\", line 1173, in startRunning\r\n    ReactorBase.startRunning(self)\r\n  File \"/usr/local/lib/python2.7/dist-packages/twisted/internet/base.py\", line 684, in startRunning\r\n    raise error.ReactorNotRestartable()\r\nReactorNotRestartable\r\n```\r\ncode\r\n\r\n```\r\n# these are the Scrapy and Twisted Framework Decorators used\r\n@defer.inlineCallbacks\r\ndef crawl(runner):\r\n    yield runner.crawl(RandomSpider)\r\n    #reactor.stop()\r\n\r\nclass WatchmenService(object):\r\n    name = 'watchmen'\r\n\r\n    @consume(queue=ew_pdf_queue)\r\n    def random_checking(self, msg):\r\n        runner = CrawlerRunner(get_project_settings())\r\n        crawl(runner)\r\n        reactor.run()\r\n```\r\n@davidszotten can you please help.\r\n       \r\n        \r\n            "}}
{"actor":{"display_login":"kgrvamsi"}}