You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Worker doesn't use environmental parameters for project definition. It obtains this as an argument (URL) for worker.py file. Hence such a definition of conf.json doesn' t work.
As you know aamks.py can receive params in two manners:
a) as an argument: aamks.py /path/to/some/project
b) from the environment, then aamks.py doesn't require params, which
means less typing in the command line.
What init.py does it merges a) and b) variants and makes sure
AAMKS_PROJECT is always available to all Aamks internals. See
manager/init.py:
if len(sys.argv) > 1: os.environ["AAMKS_PROJECT"]=sys.argv[1]
I suggest you add the same logic to the worker.py, because
partition_query.py calls are shared between the server and the worker
and assumes AAMKS_PROJECT is available. I don't know what options you
currently have to figure out the AAMKS_PROJECT on the worker. Perhaps
it's need to be included in the call or in conf.json or such.
Other option would be to try/catch if conf.json is in the current
directory (worker), and catch if it fails (server). You need to judge
yourself whether AAMKS_PROJECT is needed on the worker. Note, that
server and worker share various methods and it is likely that these
methods depend on AAMKS_PROJECT.
On 06/10/2019, akrasuski ***@***.***> wrote:
Assigned #25 to @mimooh.
--
You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub:
#25 (comment)
I'm not very happy with the idea of mixing environments (python and shell) just in order not to pass a variable as an argument for methods. But ok as Trump says.
Worker doesn't use environmental parameters for project definition. It obtains this as an argument (URL) for worker.py file. Hence such a definition of conf.json doesn' t work.
partition_query.py:
self.project_conf=self.json.read('{}/conf.json'.format(os.environ['AAMKS_PROJECT']))
If it is necessary worker.py file has defined conf.json. The question is whether it should be passed or not.
The text was updated successfully, but these errors were encountered: