Added new configuration option STRATUM_MINING_PROCESS_NAME.

This commit is contained in:
Dirk Dresch 2013-12-31 10:28:31 +01:00
parent 13030af3ff
commit 9c3d63053c
2 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,9 @@ Tx_Message = 'http://github.com/ahmedbodi/stratum-mining'
# ******************** 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).
DEBUG = False

View File

@ -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
from twisted.internet import defer
from twisted.application.service import Application, IProcess
# Run listening when mining service is ready
on_startup = defer.Deferred()
@ -14,6 +15,7 @@ import stratum
import lib.settings as settings
# Bootstrap Stratum framework
application = stratum.setup(on_startup)
IProcess(application).processName = settings.STRATUM_MINING_PROCESS_NAME
# Load mining service into stratum framework
import mining