X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=launcher_demo.tac;h=22e3799c253d676861d40abf6573d4b29524041e;hb=master;hp=ad59d5b87eb6c7548c477eeaf05bca91a0bdc3f6;hpb=6beede251a896ae773fb6949189bb249832a1bd5;p=stratum-mining.git diff --git a/launcher_demo.tac b/launcher_demo.tac index ad59d5b..22e3799 100644 --- a/launcher_demo.tac +++ b/launcher_demo.tac @@ -5,19 +5,26 @@ import os, sys sys.path = [os.path.join(os.getcwd(), 'conf'),] + sys.path +from twisted.internet import defer + +# Run listening when mining service is ready +on_startup = defer.Deferred() + # Bootstrap Stratum framework import stratum from stratum import settings -application = stratum.setup() +application = stratum.setup(on_startup) # Load mining service into stratum framework import mining from mining.interfaces import Interfaces -from mining.interfaces import WorkerManagerInterface, ShareManagerInterface, TimestamperInterface +from mining.interfaces import WorkerManagerInterface, TimestamperInterface, \ + ShareManagerInterface, ShareLimiterInterface Interfaces.set_share_manager(ShareManagerInterface()) +Interfaces.set_share_limiter(ShareLimiterInterface()) Interfaces.set_worker_manager(WorkerManagerInterface()) Interfaces.set_timestamper(TimestamperInterface()) -mining.setup() +mining.setup(on_startup)