Merge pull request #80 from ddresch/master
Added new configuration option STRATUM_MINING_PROCESS_NAME.
This commit is contained in:
commit
ca8f77ed3a
@ -46,6 +46,9 @@ Tx_Message = 'http://github.com/ahmedbodi/stratum-mining'
|
|||||||
|
|
||||||
# ******************** GENERAL SETTINGS ***************
|
# ******************** GENERAL SETTINGS ***************
|
||||||
|
|
||||||
|
# Set process name of twistd, much more comfortable if you run multiple processes on one machine
|
||||||
|
STRATUM_MINING_PROCESS_NAME= 'twistd-stratum-mining'
|
||||||
|
|
||||||
# Enable some verbose debug (logging requests and responses).
|
# Enable some verbose debug (logging requests and responses).
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import os, sys
|
|||||||
sys.path = [os.path.join(os.getcwd(), 'conf'),os.path.join(os.getcwd(), 'externals', 'stratum-mining-proxy'),] + sys.path
|
sys.path = [os.path.join(os.getcwd(), 'conf'),os.path.join(os.getcwd(), 'externals', 'stratum-mining-proxy'),] + sys.path
|
||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
from twisted.application.service import Application, IProcess
|
||||||
|
|
||||||
# Run listening when mining service is ready
|
# Run listening when mining service is ready
|
||||||
on_startup = defer.Deferred()
|
on_startup = defer.Deferred()
|
||||||
@ -14,6 +15,7 @@ import stratum
|
|||||||
import lib.settings as settings
|
import lib.settings as settings
|
||||||
# Bootstrap Stratum framework
|
# Bootstrap Stratum framework
|
||||||
application = stratum.setup(on_startup)
|
application = stratum.setup(on_startup)
|
||||||
|
IProcess(application).processName = settings.STRATUM_MINING_PROCESS_NAME
|
||||||
|
|
||||||
# Load mining service into stratum framework
|
# Load mining service into stratum framework
|
||||||
import mining
|
import mining
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user