Scrapy, a fast high-level web crawling & scraping framework for Python.
Add launcher class to config
Alexandr N Zamaraev (aka tonal)3bddedfc6dc1
diff --git a/scrapyd/app.py b/scrapyd/app.pyindex 6c860e740..a6c7b558f 100644--- a/scrapyd/app.py+++ b/scrapyd/app.py@@ -3,6 +3,8 @@ from twisted.application.internet import TimerService, TCPServerfrom twisted.web import serverfrom twisted.python import log+from scrapy.utils.misc import load_object+from .interfaces import IEggStorage, IPoller, ISpiderScheduler, IEnvironmentfrom .launcher import Launcherfrom .eggstorage import FilesystemEggStorage@@ -27,7 +29,10 @@ def application(config):app.setComponent(ISpiderScheduler, scheduler)app.setComponent(IEnvironment, environment)- launcher = Launcher(config, app)+ laupath = config.get('launcher', 'scrapyd.launcher.Launcher')+ laucls = load_object(laupath)+ launcher = laucls(config, app)+timer = TimerService(5, poller.poll)webservice = TCPServer(http_port, server.Site(Root(config, app)), interface=bind_address)log.msg("Scrapyd web console available at http://%s:%s/" % (bind_address, http_port))diff --git a/scrapyd/default_scrapyd.conf b/scrapyd/default_scrapyd.confindex de777e515..6e800803d 100644--- a/scrapyd/default_scrapyd.conf+++ b/scrapyd/default_scrapyd.conf@@ -11,3 +11,4 @@ http_port = 6800debug = offrunner = scrapyd.runnerapplication = scrapyd.app.application+launcher = scrapyd.launcher.Launcher