New POW calculation module #1284
|
@ -271,15 +271,14 @@ def setBestSolver():
|
|||
setBestSolver()
|
||||
|
||||
class singleWorker(threading.Thread, helper_threading.StoppableThread):
|
||||
name = "singleWorker"
|
||||
|
||||
def __init__(self):
|
||||
super(self.__class__, self).__init__()
|
||||
super(self.__class__, self).__init__(name = "singleWorker")
|
||||
|
||||
self.initStop()
|
||||
|
||||
def stopThread(self):
|
||||
queues.workerQueue.put(("stopThread", "data"))
|
||||
workProver.commandsQueue.put(("shutdown", ))
|
||||
|
||||
super(self.__class__, self).stopThread()
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ class WorkProver(threading.Thread):
|
|||
|
||||
self.solverName = name
|
||||
self.solver = self.availableSolvers[name]
|
||||
self.solver.setConfiguration(configuration)
|
||||
except GPUSolverError:
|
||||
pass is the dangerous statement, please log it or please write a print statement atleast... pass is the dangerous statement, please log it or please write a print statement atleast...
parallelism = self.solver.parallelism if self.solver else 0 parallelism = self.solver.parallelism if self.solver else 0
if not name and not self.solverName if not name and not self.solverName
logging is required for this functionality. logging is required for this functionality.
if not self.solver if not self.solver
if not name if not name
doc string required here doc string required here
docstring here docstring here
pep8 validation pep8 validation
docstring here please docstring here please
if not self.tasks if not self.tasks
pep8 validation pep8 validation
@PeterSurda , I think we need optimization here. @PeterSurda , I think we need optimization here.
`self.availableSolvers` is visible to the outside code, so it can log or print if `fast` is missing. It should show a message in GUI status bar like the current code does.
It's less readable. It's less readable.
It calls the It calls the `self.statusUpdated` callback and the outside code should log this and display in the GUI.
if not name and not self.solverName: if not name and not self.solverName:
pass
if self.solver: if self.solver:
….
if name: if name:
….
undefined name 'GPUSolverError' undefined name 'GPUSolverError'
|
||||
except gpusolver.GPUSolverError:
|
||||
pass is the dangerous statement, please log it or please write a print statement atleast... pass is the dangerous statement, please log it or please write a print statement atleast...
parallelism = self.solver.parallelism if self.solver else 0 parallelism = self.solver.parallelism if self.solver else 0
if not name and not self.solverName if not name and not self.solverName
logging is required for this functionality. logging is required for this functionality.
if not self.solver if not self.solver
if not name if not name
doc string required here doc string required here
docstring here docstring here
pep8 validation pep8 validation
docstring here please docstring here please
if not self.tasks if not self.tasks
pep8 validation pep8 validation
@PeterSurda , I think we need optimization here. @PeterSurda , I think we need optimization here.
`self.availableSolvers` is visible to the outside code, so it can log or print if `fast` is missing. It should show a message in GUI status bar like the current code does.
It's less readable. It's less readable.
It calls the It calls the `self.statusUpdated` callback and the outside code should log this and display in the GUI.
if not name and not self.solverName: if not name and not self.solverName:
pass
if self.solver: if self.solver:
….
if name: if name:
….
undefined name 'GPUSolverError' undefined name 'GPUSolverError'
|
||||
self.solverName = None
|
||||
self.solver = None
|
||||
|
||||
|
|
|||
pass is the dangerous statement, please log it or please write a print statement atleast... pass is the dangerous statement, please log it or please write a print statement atleast...
pass is the dangerous statement, please log it or please write a print statement atleast... pass is the dangerous statement, please log it or please write a print statement atleast...
parallelism = self.solver.parallelism if self.solver else 0 parallelism = self.solver.parallelism if self.solver else 0
parallelism = self.solver.parallelism if self.solver else 0 parallelism = self.solver.parallelism if self.solver else 0
if not name and not self.solverName if not name and not self.solverName
if not name and not self.solverName if not name and not self.solverName
logging is required for this functionality. logging is required for this functionality.
logging is required for this functionality. logging is required for this functionality.
if not self.solver if not self.solver
if not self.solver if not self.solver
if not name if not name
if not name if not name
doc string required here doc string required here
doc string required here doc string required here
docstring here docstring here
docstring here docstring here
pep8 validation pep8 validation
pep8 validation pep8 validation
docstring here please docstring here please
docstring here please docstring here please
if not self.tasks if not self.tasks
if not self.tasks if not self.tasks
pep8 validation pep8 validation
pep8 validation pep8 validation
@PeterSurda , I think we need optimization here. @PeterSurda , I think we need optimization here.
@PeterSurda , I think we need optimization here. @PeterSurda , I think we need optimization here.
`self.availableSolvers` is visible to the outside code, so it can log or print if `fast` is missing. It should show a message in GUI status bar like the current code does.
`self.availableSolvers` is visible to the outside code, so it can log or print if `fast` is missing. It should show a message in GUI status bar like the current code does.
It's less readable. It's less readable.
It's less readable. It's less readable.
It calls the It calls the `self.statusUpdated` callback and the outside code should log this and display in the GUI.
It calls the It calls the `self.statusUpdated` callback and the outside code should log this and display in the GUI.
if not name and not self.solverName: if not name and not self.solverName:
pass
if not name and not self.solverName: if not name and not self.solverName:
pass
if self.solver: if self.solver:
….
if self.solver: if self.solver:
….
if name: if name:
….
if name: if name:
….
undefined name 'GPUSolverError' undefined name 'GPUSolverError'
undefined name 'GPUSolverError' undefined name 'GPUSolverError'
|
pass is the dangerous statement, please log it or please write a print statement atleast...
pass is the dangerous statement, please log it or please write a print statement atleast...
parallelism = self.solver.parallelism if self.solver else 0
parallelism = self.solver.parallelism if self.solver else 0
if not name and not self.solverName
if not name and not self.solverName
logging is required for this functionality.
logging is required for this functionality.
if not self.solver
if not self.solver
if not name
if not name
doc string required here
doc string required here
docstring here
docstring here
pep8 validation
pep8 validation
docstring here please
docstring here please
if not self.tasks
if not self.tasks
pep8 validation
pep8 validation
@PeterSurda , I think we need optimization here.
@PeterSurda , I think we need optimization here.
self.availableSolvers
is visible to the outside code, so it can log or print iffast
is missing. It should show a message in GUI status bar like the current code does.self.availableSolvers
is visible to the outside code, so it can log or print iffast
is missing. It should show a message in GUI status bar like the current code does.It's less readable.
It's less readable.
It calls the
self.statusUpdated
callback and the outside code should log this and display in the GUI.It calls the
self.statusUpdated
callback and the outside code should log this and display in the GUI.if not name and not self.solverName:
pass
if not name and not self.solverName:
pass
if self.solver:
….
if self.solver:
….
if name:
….
if name:
….
undefined name 'GPUSolverError'
undefined name 'GPUSolverError'