DistributedTaskScheduling / JobAdder

Source code of the JobAdder project
GNU General Public License v3.0
2 stars 1 forks source link

Augment proxies to set type_name #118

Closed ammen99 closed 4 years ago

ammen99 commented 4 years ago

I just noticed we never set the type_name which the command handlers use to differentiate between commands:

https://github.com/DistributedTaskScheduling/JobAdder/blob/master/src/ja/common/proxy/command_handler.py#L60

As a result, the server and the worker will never be able to parse commands (except if I am mistaken and this is set somewhere, but I could not find any reference to type_name aside from the command handlers). I think we can either

  1. Make the proxies pass it as an additional argument to the SSH connection

  2. Make the SSH connection infer the type by looking at the Python class name (object.__class__.__name__)

What do you think is the better approach? My personal preference is 2. since it is easier to implement and won't require changing the interfaces, plus removes the need to manually specify the type everywhere.

ammen99 commented 4 years ago

I think this has been fixed.