zatosource / zato

ESB, SOA, REST, APIs and Cloud Integrations in Python
https://zato.io
GNU Affero General Public License v3.0
1.1k stars 239 forks source link

Import with enmasse gives AttributeError on _on_scheduler #751

Closed jjmurre closed 7 years ago

jjmurre commented 7 years ago

Traceback (most recent call last): File "/opt/APPS/servicebus/tst/zato-3/code/bin/zato", line 197, in sys.exit(zato.cli.zato_command.main()) File "/opt/APPS/servicebus/tst/zato-3/code/zato-cli/src/zato/cli/zato_command.py", line 261, in main return run_command(get_parser().parse_args()) File "/opt/APPS/servicebus/tst/zato-3/code/zato-cli/src/zato/cli/init.py", line 265, in run_command command_classargs.command.run(args) File "/opt/APPS/servicebus/tst/zato-3/code/zato-cli/src/zato/cli/init.py", line 486, in run return_code = self.execute(args) File "/opt/APPS/servicebus/tst/zato-3/code/zato-cli/src/zato/cli/init.py", line 718, in execute return self._get_dispatch()json_data['component'] File "/opt/APPS/servicebus/tst/zato-3/code/zato-cli/src/zato/cli/init.py", line 689, in _get_dispatch self.COMPONENTS.SCHEDULER.code: self._on_scheduler, AttributeError: 'EnMasse' object has no attribute '_on_scheduler'

jjmurre commented 7 years ago

In zato_cli the "start" and "stop" commands have an "_on_scheduler" method, but that is missing from enmasse.

jjmurre commented 7 years ago

On the forum, @dsuch explained an easy fix:

" ....in the ZatoCommand class there is this bit of _on_web_admin = _on_server = _on_lb. You can just add _on_scheduler to it and this will do since Enmasse does not need to implement the method."

dsuch commented 7 years ago

Closing the ticket, thank you for the PR @jjmurre!