Skip to content

Commit

Permalink
Merge branch 'dev-kube' of https://github.com/quanted/cts_celery into…
Browse files Browse the repository at this point in the history
… dev-kube
  • Loading branch information
popenc committed Nov 4, 2024
2 parents 335a8e0 + 8f2f0de commit 5c1808f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cts_calcs
31 changes: 19 additions & 12 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,15 +560,22 @@ def handle_epi_request(self, sessionid, request_post):
)
return
for _data_obj in _results.get('data', []):
_epi_prop = _data_obj.get('prop')
_cts_prop_name = self.epi_calc.props[self.epi_calc.epi_props.index(_epi_prop)] # map epi ws key to cts prop key
_method = _data_obj.get('method')
if _method:
# Use abbreviated method name for pchem table:
_epi_methods = self.epi_calc.propMap.get(_cts_prop_name).get('methods', {})
_method = _epi_methods.get(_data_obj['method']) # use pchem table name for method
if _cts_prop_name in props:
_data_obj.update(_response_info) # data obj going to client needs some extra keys
_data_obj['prop'] = _cts_prop_name
_data_obj['method'] = _method
self.redis_conn.publish(sessionid, json.dumps(_data_obj))

self.redis_conn.publish(sessionid, json.dumps(_data_obj))

# _epi_prop = _data_obj.get('prop')

# logging.warning("_epi_prop: {}".format(_epi_prop))
# epi_prop = self.epi_calc.epi_props.index(_epi_prop)
# logging.warning("epi_prop: {}".format(epi_prop))
# _cts_prop_name = self.epi_calc.props[self.epi_calc.epi_props.index(_epi_prop)] # map epi ws key to cts prop key
# _method = _data_obj.get('method')
# if _method:
# # Use abbreviated method name for pchem table:
# _epi_methods = self.epi_calc.propMap.get(_cts_prop_name).get('methods', {})
# _method = _epi_methods.get(_data_obj['method']) # use pchem table name for method
# if _cts_prop_name in props:
# _data_obj.update(_response_info) # data obj going to client needs some extra keys
# _data_obj['prop'] = _cts_prop_name
# _data_obj['method'] = _method
# self.redis_conn.publish(sessionid, json.dumps(_data_obj))

0 comments on commit 5c1808f

Please sign in to comment.