X-Git-Url: https://git.novaco.in/?p=stratum-mining.git;a=blobdiff_plain;f=launcher_demo.tac;h=6759ad85ed1a9e0aae11660f1921fd09f1c1a212;hp=ad59d5b87eb6c7548c477eeaf05bca91a0bdc3f6;hb=5cf1b39c915d234d31156d417005adc3719d5649;hpb=09d1b8f66af352888829945e77f4d0989bdace12 diff --git a/launcher_demo.tac b/launcher_demo.tac index ad59d5b..6759ad8 100644 --- a/launcher_demo.tac +++ b/launcher_demo.tac @@ -5,10 +5,15 @@ 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 @@ -20,4 +25,4 @@ Interfaces.set_share_manager(ShareManagerInterface()) Interfaces.set_worker_manager(WorkerManagerInterface()) Interfaces.set_timestamper(TimestamperInterface()) -mining.setup() +mining.setup(on_startup)