Skip to content

Commit

Permalink
Merge pull request #5680 from belforte/betterSeqW
Browse files Browse the repository at this point in the history
add a way to start in PDB from command line
  • Loading branch information
belforte authored May 23, 2018
2 parents 6655cc0 + 47532eb commit 99e7034
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/python/SequentialWorker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
""" This worker can be used for testing purposes. Just run:
"python SequentialWorker.py /path/to/config"
and have fun!
If you want to immedately start a pdb session add a 2nd argument (any word will do)
"python SequentialWorker.py /path/to/config d"
More details: it instantiates the MasterWorker with the TEST flag True. This makes the MasterWorker
sequential (it does not instantiate new threads) and the logging is done at the console and not on
Expand All @@ -20,5 +22,11 @@
config.TaskWorker.nslaves = 1

validateConfig(config)

usePdb = ( len(sys.argv) == 3 )
if usePdb:
import pdb
pdb.set_trace()

mc = MasterWorker(config, False, True, True)
mc.algorithm()

0 comments on commit 99e7034

Please sign in to comment.