removed name from worker; just small design fixes
This commit is contained in:
parent
a09cdf980e
commit
7b71188854
2 changed files with 6 additions and 8 deletions
|
|
@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
__version__ = "0.15.2/AMNESIA"
|
__version__ = "0.15.3/AMNESIA"
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import datetime
|
import datetime
|
||||||
|
|
@ -125,8 +125,7 @@ def main():
|
||||||
|
|
||||||
workers = []
|
workers = []
|
||||||
for i in range(0, args.instances):
|
for i in range(0, args.instances):
|
||||||
name = "LinspectorWorker-"+str(i)
|
process = LinspectorWorker(args.corethreads, args.threads)
|
||||||
process = LinspectorWorker(name, args.corethreads, args.threads)
|
|
||||||
workers.append(process)
|
workers.append(process)
|
||||||
process.daemon = True
|
process.daemon = True
|
||||||
|
|
||||||
|
|
@ -161,13 +160,13 @@ def main():
|
||||||
if instance == args.instances:
|
if instance == args.instances:
|
||||||
instance = 0
|
instance = 0
|
||||||
|
|
||||||
|
print("\nScheduled " + str(job_count) + " jobs")
|
||||||
|
|
||||||
schedulers = []
|
schedulers = []
|
||||||
for worker in workers:
|
for worker in workers:
|
||||||
schedulers.append(worker.get_scheduler())
|
schedulers.append(worker.get_scheduler())
|
||||||
worker.start()
|
worker.start()
|
||||||
|
|
||||||
print("\nScheduled " + str(job_count) + " jobs")
|
|
||||||
|
|
||||||
interface = LinspectorInterface(jobs, schedulers, lin_conf, root_logger, __version__)
|
interface = LinspectorInterface(jobs, schedulers, lin_conf, root_logger, __version__)
|
||||||
|
|
||||||
if "jsonrpc_backend" in core and core["jsonrpc_backend"]:
|
if "jsonrpc_backend" in core and core["jsonrpc_backend"]:
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,9 @@ logger = getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class LinspectorWorker(Process):
|
class LinspectorWorker(Process):
|
||||||
def __init__(self, name, core_threads, max_threads):
|
def __init__(self, core_threads, max_threads):
|
||||||
super(LinspectorWorker, self).__init__()
|
super(LinspectorWorker, self).__init__()
|
||||||
|
|
||||||
self._name = name
|
|
||||||
self.core_threads = core_threads
|
self.core_threads = core_threads
|
||||||
self.max_threads = max_threads
|
self.max_threads = max_threads
|
||||||
|
|
||||||
|
|
@ -46,7 +45,7 @@ class LinspectorWorker(Process):
|
||||||
job.handle_call()
|
job.handle_call()
|
||||||
|
|
||||||
def get_name(self):
|
def get_name(self):
|
||||||
return self.name
|
return self._name
|
||||||
|
|
||||||
def get_scheduler(self):
|
def get_scheduler(self):
|
||||||
return self.scheduler
|
return self.scheduler
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue