Skip to content

Commit

Permalink
Provide post_eval that uses post_grid to support axon functions that …
Browse files Browse the repository at this point in the history
…require POST
  • Loading branch information
Case Larsen authored and Case Larsen committed Jun 10, 2021
1 parent 3c35082 commit f746535
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyhaystack/client/mixins/vendor/skyspark/evalexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
This is a BETA function that will need to be tested by users
"""
import hszinc


class EvalOpsMixin(object):
Expand Down Expand Up @@ -38,6 +39,13 @@ def get_eval(self, arg_expr):
url = "eval?expr=%s" % arg_expr
return self._get_grid(url, callback=lambda *a, **k: None)

def post_eval(self, arg_expr):
url = "eval"
eval_grid = hszinc.Grid()
eval_grid.column["expr"] = {}
eval_grid.append({"expr": arg_expr})
return self._post_grid(url, eval_grid, callback=lambda *a, **k: None)


# ===========================
# This function is commented and not working. I don't have anything to test
Expand Down

0 comments on commit f746535

Please sign in to comment.