/tut2/Tutorial2Runner.py

https://bitbucket.org/chadburrus/rabbitmq-tutorials
Python | 19 lines | 14 code | 5 blank | 0 comment | 1 complexity | f964673ffc268f60a1c47019c0cad829 MD5 | raw file
  1. from Runner import Runner
  2. class Tutorial2Runner(Runner):
  3. def __init__(self, count):
  4. super(type(self), self)
  5. self.count = count
  6. def kickoff(self):
  7. count = self.count
  8. for i in range(1, count):
  9. message = "Sending message # %s %s" % (i, "." * i)
  10. command = "python durable_task.py '%s'" % message
  11. print "Running command \"%s\"" % command
  12. self._run(command, shell=True)
  13. runner = Tutorial2Runner(30)
  14. runner.kickoff()