Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
remove name property from command
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-burnett committed Jun 9, 2014
1 parent 2846790 commit 8131207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions ptero_petri/implementation/orchestrator/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
notify_place_handler=PetriNotifyPlaceHandler,
notify_transition_handler=PetriNotifyTransitionHandler)
class OrchestratorCommand(object):
name = 'orchestrator'

def __init__(self):
self.broker.register_handler(self.create_token_handler)
self.broker.register_handler(self.notify_place_handler)
Expand Down
8 changes: 3 additions & 5 deletions ptero_petri/implementation/orchestrator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ def _get_logging_level():
def naked_main():
logging.basicConfig(level=_get_logging_level())

command_class = OrchestratorCommand

injector = initialize_injector()

# XXX Hack to get the command to show up in the rabbitmq admin interface
pika.connection.PRODUCT = command_class.name
pika.connection.PRODUCT = 'orchestrator'

try:
LOG.info('Loading command (%s)', command_class.name)
command = injector.get(command_class)
LOG.info('Instantiating orchestrator comand...')
command = injector.get(OrchestratorCommand)
except:
LOG.exception('Could not instantiate command object.')
return exit_codes.EXECUTE_ERROR
Expand Down

0 comments on commit 8131207

Please sign in to comment.