title: ValueError: signal only works in main thread
body: <p>When i run this code i get this error:</p>
  
  <blockquote>
    <p>ValueError: signal only works in main thread</p>
  </blockquote>
  
  <p>I'm using ActiveMQ.</p>
  
  <p>RealTor is the name where i have my Spider(selogerSpider) this one help me for the scraping.</p>
  
  <pre><code> import stomp
   from RealTor import selogerSpider
   from scrapy.crawler import CrawlerProcess
   from scrapy.settings import Settings
  
  
  class MyListener(stomp.ConnectionListener):
  def on_error(self, headers, message):
      print('received an error "%s"' % message)
  def on_message(self, headers, message):
      print('received a message "%s"' % message)
  
      settings = Settings()
      settings.set("USER_AGENT",
                   "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) 
      AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36")
      settings.set("LOG_ENABLED", False)
      crawler = CrawlerProcess(settings)
      crawler.crawl(selogerSpider)
      selogerSpider.signals.engine_started()
      print("STARTING scraping")
      crawler.start()
      print("Scraping STOPPED")
  try:
  conn = stomp.Connection()
  conn.set_listener('', MyListener())
  conn.start()
  """ conn = stomp.Connection([('0.0.0.0', 61613)])"""
  conn.connect('admin', 'password', wait=True)
  conn.subscribe(destination='/queue/test', id=1, ack='auto')
  print('subscripe')
  """conn.send(body=' '.join(sys.argv[1:]), destination='/queue/test')"""
  input("coucou")
  """conn.disconnect()"""
  print('end')
  
  except IOError as e:
    print("error message")
  </code></pre>