From 9c3d63053cf43fdcac379f4da8fe9f866a98ea95 Mon Sep 17 00:00:00 2001 From: Dirk Dresch Date: Tue, 31 Dec 2013 10:28:31 +0100 Subject: [PATCH] Added new configuration option STRATUM_MINING_PROCESS_NAME. --- conf/config_sample.py | 3 +++ launcher.tac | 2 ++ 2 files changed, 5 insertions(+) diff --git a/conf/config_sample.py b/conf/config_sample.py index 50beefa..6065756 100644 --- a/conf/config_sample.py +++ b/conf/config_sample.py @@ -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 diff --git a/launcher.tac b/launcher.tac index 2fbd2d0..97e168a 100644 --- a/launcher.tac +++ b/launcher.tac @@ -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