jaseci 1.4.2.6__py3-none-any.whl → 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of jaseci might be problematic. Click here for more details.

Files changed (187) hide show
  1. jaseci/__init__.py +3 -37
  2. jaseci-2.0.0.dist-info/METADATA +65 -0
  3. jaseci-2.0.0.dist-info/RECORD +4 -0
  4. {jaseci-1.4.2.6.dist-info → jaseci-2.0.0.dist-info}/WHEEL +1 -2
  5. jaseci/VERSION +0 -1
  6. jaseci/cli_tools/__init__.py +0 -0
  7. jaseci/cli_tools/book_tools.py +0 -457
  8. jaseci/cli_tools/jsctl.py +0 -500
  9. jaseci/cli_tools/tests/__init__.py +0 -0
  10. jaseci/cli_tools/tests/test_jsctl.py +0 -556
  11. jaseci/extens/__init__.py +0 -0
  12. jaseci/extens/act_lib/__init__.py +0 -0
  13. jaseci/extens/act_lib/date.py +0 -118
  14. jaseci/extens/act_lib/elastic.py +0 -87
  15. jaseci/extens/act_lib/file.py +0 -77
  16. jaseci/extens/act_lib/file_handler.py +0 -190
  17. jaseci/extens/act_lib/internal.py +0 -19
  18. jaseci/extens/act_lib/jaseci.py +0 -62
  19. jaseci/extens/act_lib/mail.py +0 -10
  20. jaseci/extens/act_lib/maths.py +0 -168
  21. jaseci/extens/act_lib/net.py +0 -192
  22. jaseci/extens/act_lib/rand.py +0 -83
  23. jaseci/extens/act_lib/regex.py +0 -85
  24. jaseci/extens/act_lib/request.py +0 -170
  25. jaseci/extens/act_lib/std.py +0 -236
  26. jaseci/extens/act_lib/storage.py +0 -53
  27. jaseci/extens/act_lib/stripe.py +0 -338
  28. jaseci/extens/act_lib/task.py +0 -14
  29. jaseci/extens/act_lib/tests/__init__.py +0 -0
  30. jaseci/extens/act_lib/tests/std_test_code.py +0 -37
  31. jaseci/extens/act_lib/tests/test_date.py +0 -26
  32. jaseci/extens/act_lib/tests/test_elastic.py +0 -159
  33. jaseci/extens/act_lib/tests/test_file.py +0 -116
  34. jaseci/extens/act_lib/tests/test_file_lib.py +0 -40
  35. jaseci/extens/act_lib/tests/test_mail_lib.py +0 -33
  36. jaseci/extens/act_lib/tests/test_maths.py +0 -147
  37. jaseci/extens/act_lib/tests/test_net_lib.py +0 -62
  38. jaseci/extens/act_lib/tests/test_regex.py +0 -61
  39. jaseci/extens/act_lib/tests/test_std.py +0 -51
  40. jaseci/extens/act_lib/tests/test_std_lib.py +0 -36
  41. jaseci/extens/act_lib/tests/test_url.py +0 -32
  42. jaseci/extens/act_lib/tests/test_vector.py +0 -36
  43. jaseci/extens/act_lib/tests/test_webtool.py +0 -44
  44. jaseci/extens/act_lib/tests/test_zlib.py +0 -24
  45. jaseci/extens/act_lib/url.py +0 -80
  46. jaseci/extens/act_lib/vector.py +0 -158
  47. jaseci/extens/act_lib/webtool.py +0 -29
  48. jaseci/extens/act_lib/zip.py +0 -34
  49. jaseci/extens/api/__init__.py +0 -0
  50. jaseci/extens/api/actions_api.py +0 -171
  51. jaseci/extens/api/alias_api.py +0 -140
  52. jaseci/extens/api/architype_api.py +0 -197
  53. jaseci/extens/api/config_api.py +0 -129
  54. jaseci/extens/api/global_api.py +0 -85
  55. jaseci/extens/api/graph_api.py +0 -168
  56. jaseci/extens/api/health_api.py +0 -21
  57. jaseci/extens/api/interface.py +0 -269
  58. jaseci/extens/api/jac_api.py +0 -172
  59. jaseci/extens/api/jsorc_api.py +0 -317
  60. jaseci/extens/api/logger_api.py +0 -90
  61. jaseci/extens/api/master_api.py +0 -134
  62. jaseci/extens/api/object_api.py +0 -102
  63. jaseci/extens/api/prometheus_api.py +0 -75
  64. jaseci/extens/api/queue_api.py +0 -141
  65. jaseci/extens/api/sentinel_api.py +0 -271
  66. jaseci/extens/api/share_api.py +0 -64
  67. jaseci/extens/api/super_api.py +0 -65
  68. jaseci/extens/api/tests/__init__.py +0 -0
  69. jaseci/extens/api/tests/test_architype_api.py +0 -66
  70. jaseci/extens/api/tests/test_global_api.py +0 -179
  71. jaseci/extens/api/tests/test_graph_api.py +0 -64
  72. jaseci/extens/api/tests/test_logger_api.py +0 -43
  73. jaseci/extens/api/tests/test_object_api.py +0 -20
  74. jaseci/extens/api/tests/test_sentinel_api.py +0 -66
  75. jaseci/extens/api/tests/test_uncommon.py +0 -107
  76. jaseci/extens/api/tests/test_user_api.py +0 -32
  77. jaseci/extens/api/tests/test_walker_api.py +0 -316
  78. jaseci/extens/api/user_api.py +0 -166
  79. jaseci/extens/api/walker_api.py +0 -299
  80. jaseci/extens/api/webhook_api.py +0 -77
  81. jaseci/extens/svc/__init__.py +0 -0
  82. jaseci/extens/svc/elastic_svc.py +0 -366
  83. jaseci/extens/svc/kube_svc.py +0 -432
  84. jaseci/extens/svc/mail_svc.py +0 -156
  85. jaseci/extens/svc/prome_svc.py +0 -378
  86. jaseci/extens/svc/redis_svc.py +0 -63
  87. jaseci/extens/svc/storage_svc.py +0 -193
  88. jaseci/extens/svc/stripe_svc.py +0 -51
  89. jaseci/extens/svc/task_svc.py +0 -155
  90. jaseci/extens/svc/tasks.py +0 -302
  91. jaseci/jac/__init__.py +0 -0
  92. jaseci/jac/interpreter/__init__.py +0 -0
  93. jaseci/jac/interpreter/architype_interp.py +0 -219
  94. jaseci/jac/interpreter/interp.py +0 -1784
  95. jaseci/jac/interpreter/sentinel_interp.py +0 -260
  96. jaseci/jac/interpreter/tests/__init__.py +0 -0
  97. jaseci/jac/interpreter/tests/test_interp.py +0 -42
  98. jaseci/jac/interpreter/walker_interp.py +0 -249
  99. jaseci/jac/ir/__init__.py +0 -0
  100. jaseci/jac/ir/ast.py +0 -73
  101. jaseci/jac/ir/ast_builder.py +0 -249
  102. jaseci/jac/ir/jac_code.py +0 -151
  103. jaseci/jac/ir/passes/__init__.py +0 -6
  104. jaseci/jac/ir/passes/ast_prune_pass.py +0 -9
  105. jaseci/jac/ir/passes/codegen_pass.py +0 -244
  106. jaseci/jac/ir/passes/ir_pass.py +0 -29
  107. jaseci/jac/ir/passes/printer_pass.py +0 -23
  108. jaseci/jac/ir/passes/pt_prune_pass.py +0 -29
  109. jaseci/jac/ir/passes/schedule.py +0 -23
  110. jaseci/jac/ir/passes/stats_pass.py +0 -16
  111. jaseci/jac/jac.g4 +0 -450
  112. jaseci/jac/jac_parse/__init__.py +0 -0
  113. jaseci/jac/jac_parse/jacLexer.py +0 -809
  114. jaseci/jac/jac_parse/jacListener.py +0 -853
  115. jaseci/jac/jac_parse/jacParser.py +0 -9192
  116. jaseci/jac/jac_set.py +0 -120
  117. jaseci/jac/jsci_vm/__init__.py +0 -0
  118. jaseci/jac/jsci_vm/disasm.py +0 -94
  119. jaseci/jac/jsci_vm/inst_ptr.py +0 -31
  120. jaseci/jac/jsci_vm/machine.py +0 -188
  121. jaseci/jac/jsci_vm/op_codes.py +0 -82
  122. jaseci/jac/jsci_vm/tests/__init__.py +0 -0
  123. jaseci/jac/jsci_vm/tests/test_codegen.py +0 -31
  124. jaseci/jac/machine/__init__.py +0 -0
  125. jaseci/jac/machine/jac_scope.py +0 -86
  126. jaseci/jac/machine/jac_value.py +0 -227
  127. jaseci/jac/machine/machine_state.py +0 -386
  128. jaseci/jac/tests/__init__.py +0 -0
  129. jaseci/jac/tests/book_code.py +0 -624
  130. jaseci/jac/tests/test_book.py +0 -380
  131. jaseci/jac/tests/test_lang_14.py +0 -49
  132. jaseci/jsorc/__init__.py +0 -7
  133. jaseci/jsorc/jsorc.py +0 -642
  134. jaseci/jsorc/jsorc_settings.py +0 -211
  135. jaseci/jsorc/jsorc_utils.py +0 -298
  136. jaseci/jsorc/live_actions.py +0 -365
  137. jaseci/jsorc/manifests/__init__.py +0 -0
  138. jaseci/jsorc/manifests/database.yaml +0 -109
  139. jaseci/jsorc/manifests/elastic.yaml +0 -6029
  140. jaseci/jsorc/manifests/prometheus.yaml +0 -1383
  141. jaseci/jsorc/manifests/redis.yaml +0 -64
  142. jaseci/jsorc/memory.py +0 -258
  143. jaseci/jsorc/redis.py +0 -140
  144. jaseci/jsorc/remote_actions.py +0 -158
  145. jaseci/jsorc/tests/__init__.py +0 -0
  146. jaseci/jsorc/tests/test_actions.py +0 -542
  147. jaseci/jsorc/tests/test_jsorc.py +0 -112
  148. jaseci/prim/__init__.py +0 -0
  149. jaseci/prim/ability.py +0 -94
  150. jaseci/prim/architype.py +0 -90
  151. jaseci/prim/edge.py +0 -173
  152. jaseci/prim/element.py +0 -233
  153. jaseci/prim/graph.py +0 -27
  154. jaseci/prim/master.py +0 -67
  155. jaseci/prim/node.py +0 -533
  156. jaseci/prim/obj_mixins.py +0 -238
  157. jaseci/prim/sentinel.py +0 -282
  158. jaseci/prim/super_master.py +0 -31
  159. jaseci/prim/walker.py +0 -261
  160. jaseci/svc/__init__.py +0 -0
  161. jaseci/tests/__init__.py +0 -0
  162. jaseci/tests/infer.py +0 -39
  163. jaseci/tests/jac_test_code.py +0 -1293
  164. jaseci/tests/jac_test_progs.py +0 -774
  165. jaseci/tests/test_core.py +0 -153
  166. jaseci/tests/test_jac.py +0 -824
  167. jaseci/tests/test_node.py +0 -89
  168. jaseci/tests/test_progs.py +0 -702
  169. jaseci/tests/test_stack.py +0 -220
  170. jaseci/tests/test_stripe.py +0 -225
  171. jaseci/utils/__init__.py +0 -0
  172. jaseci/utils/actions/__init__.py +0 -0
  173. jaseci/utils/actions/actions_manager.py +0 -254
  174. jaseci/utils/actions/actions_optimizer.py +0 -517
  175. jaseci/utils/actions/actions_state.py +0 -95
  176. jaseci/utils/file_handler.py +0 -171
  177. jaseci/utils/gprof2dot.py +0 -3786
  178. jaseci/utils/id_list.py +0 -169
  179. jaseci/utils/json_handler.py +0 -70
  180. jaseci/utils/log_utils.py +0 -57
  181. jaseci/utils/test_core.py +0 -62
  182. jaseci/utils/utils.py +0 -387
  183. jaseci-1.4.2.6.dist-info/LICENSE +0 -21
  184. jaseci-1.4.2.6.dist-info/METADATA +0 -39
  185. jaseci-1.4.2.6.dist-info/RECORD +0 -185
  186. jaseci-1.4.2.6.dist-info/entry_points.txt +0 -3
  187. jaseci-1.4.2.6.dist-info/top_level.txt +0 -1
@@ -1,299 +0,0 @@
1
- """
2
- Walker api functions as a mixin
3
- """
4
-
5
- from jaseci.extens.api.interface import Interface
6
- from jaseci.prim.walker import Walker
7
- from jaseci.prim.node import Node
8
- from jaseci.prim.sentinel import Sentinel
9
- from jaseci.utils.id_list import IdList
10
-
11
-
12
- class WalkerApi:
13
- """
14
- Walker APIs
15
-
16
- The walker set of APIs are used for execution and management of walkers. Walkers
17
- are the primary entry points for running Jac programs. The
18
- primary API used to run walkers is \\textbf{walker_run}. There are a number of
19
- variations on this API that enable the invocation of walkers with various
20
- semantics.
21
- """
22
-
23
- def __init__(self):
24
- self.spawned_walker_ids = IdList(self)
25
- self.yielded_walkers_ids = IdList(self)
26
- self.reset_profiling(False)
27
-
28
- def reset_profiling(self, profiling):
29
- self._profiling = profiling
30
- self._jac_profile = {}
31
-
32
- @Interface.private_api(cli_args=["wlk"])
33
- def walker_get(self, wlk: Walker, mode: str = "default", detailed: bool = False):
34
- """
35
- Get a walker rendered with specific mode
36
- Valid modes: {default, code, ir, keys, }
37
- """
38
- if mode == "code":
39
- return wlk._jac_ast.get_text()
40
- elif mode == "ir":
41
- return wlk.ir_dict()
42
- elif mode == "keys":
43
- return wlk.namespace_keys()
44
- else:
45
- return wlk.serialize(detailed=detailed)
46
-
47
- @Interface.private_api()
48
- def walker_total(self, snt: Sentinel = None, detailed: bool = False):
49
- """
50
- Get total walkers known to sentinel
51
- """
52
- objects = snt.arch_ids.obj_list()
53
- walker_objects = list(filter(lambda obj: obj.kind == "walker", objects))
54
- return len(walker_objects)
55
-
56
- @Interface.private_api()
57
- def walker_list(self, snt: Sentinel = None, detailed: bool = False):
58
- """
59
- List walkers known to sentinel
60
- """
61
- walks = []
62
- for i in snt.arch_ids.obj_list():
63
- if i.kind == "walker":
64
- walks.append(i.serialize(detailed=detailed))
65
- return walks
66
-
67
- @Interface.private_api(cli_args=["name"])
68
- def walker_spawn_create(self, name: str, snt: Sentinel = None):
69
- """
70
- Creates new instance of walker and returns new walker object
71
- """
72
- wlk = snt.run_architype(name=name, kind="walker", caller=self, is_async=False)
73
- wlk.make_persistent()
74
- if wlk:
75
- if self.spawned_walker_ids.has_obj_by_name(name):
76
- self.spawned_walker_ids.destroy_obj_by_name(name)
77
- self.spawned_walker_ids.add_obj(wlk)
78
- self.alias_register(f"spawned:walker:{name}", wlk.jid)
79
- return wlk.serialize()
80
- else:
81
- return ["Walker not found!"]
82
-
83
- @Interface.private_api()
84
- def walker_spawn_list(self, detailed: bool = False):
85
- """
86
- List walkers spawned by master
87
- """
88
- walks = []
89
- for i in self.spawned_walker_ids.obj_list():
90
- walks.append(i.serialize(detailed=detailed))
91
- return walks
92
-
93
- @Interface.private_api(cli_args=["name"])
94
- def walker_spawn_delete(self, name: str):
95
- """
96
- Delete instance of walker
97
- """
98
- if self.spawned_walker_ids.has_obj_by_name(name):
99
- self.spawned_walker_ids.destroy_obj_by_name(name)
100
- self.alias_delete(f"spawned:walker:{name}")
101
- return [f"Walker {name} deteled!"]
102
- else:
103
- return [f"Walker {name} not found!"]
104
-
105
- @Interface.private_api()
106
- def walker_spawn_clear(self):
107
- """
108
- Delete instance of walker
109
- """
110
- ret = {"success": True}
111
- count = len(self.spawned_walker_ids)
112
- for i in self.spawned_walker_ids.obj_list():
113
- self.spawned_walker_ids.destroy_obj(i)
114
- ret["response"] = f"All {count} spawned walkers destroyed."
115
- return ret
116
-
117
- @Interface.private_api()
118
- def walker_yield_list(self, detailed: bool = False):
119
- """
120
- List walkers spawned by master
121
- """
122
- walks = []
123
- for i in self.yielded_walkers_ids.obj_list():
124
- walks.append(i.serialize(detailed=detailed))
125
- return walks
126
-
127
- @Interface.private_api(cli_args=["name"])
128
- def walker_yield_delete(self, name: str):
129
- """
130
- Delete instance of walker
131
- """
132
- ret = {"success": True}
133
- if self.yielded_walkers_ids.has_obj_by_name(name):
134
- self.yielded_walkers_ids.destroy_obj_by_name(name)
135
- ret["response"] = f"Walker {name} deteled!"
136
- else:
137
- ret["success"] = False
138
- ret["response"] = f"Walker {name} not found!"
139
- return ret
140
-
141
- @Interface.private_api()
142
- def walker_yield_clear(self):
143
- """
144
- Delete instance of walker
145
- """
146
- ret = {"success": True}
147
- count = len(self.yielded_walkers_ids)
148
- for i in self.yielded_walkers_ids.obj_list():
149
- self.yielded_walkers_ids.destroy_obj(i)
150
- ret["response"] = f"All {count} yielded walkers destroyed."
151
- return ret
152
-
153
- @Interface.private_api(cli_args=["wlk"])
154
- def walker_prime(
155
- self, wlk: Walker, nd: Node = None, ctx: dict = {}, _req_ctx: dict = {}
156
- ):
157
- """
158
- Assigns walker to a graph node and primes walker for execution
159
- """
160
- wlk.prime(nd, prime_ctx=ctx, request_ctx=_req_ctx)
161
- return [f"Walker primed on node {nd.id}"]
162
-
163
- @Interface.private_api(cli_args=["wlk"])
164
- def walker_execute(
165
- self,
166
- wlk: Walker,
167
- prime: Node = None,
168
- ctx: dict = {},
169
- _req_ctx: dict = {},
170
- profiling: bool = False,
171
- ):
172
- """
173
- Executes walker (assumes walker is primed)
174
- """
175
- self.reset_profiling(profiling)
176
- return wlk.run(
177
- start_node=prime, prime_ctx=ctx, request_ctx=_req_ctx, profiling=profiling
178
- )
179
-
180
- @Interface.private_api(cli_args=["wlk"])
181
- def walker_step(self, wlk: Walker, detailed: bool = False):
182
- """
183
- Executes walker (assumes walker is primed)
184
- """
185
- wlk.step()
186
- ret = {
187
- "current_node": wlk.current_node.serialize(detailed=detailed),
188
- "next_node_ids": wlk.next_node_ids,
189
- "walker_context": wlk.serialize(detailed=detailed)["context"],
190
- "walker_report": wlk.report,
191
- "profile": wlk.profile,
192
- }
193
- return ret
194
-
195
- @Interface.private_api(cli_args=["name"])
196
- def walker_run(
197
- self,
198
- name: str,
199
- nd: Node = None,
200
- ctx: dict = {},
201
- _req_ctx: dict = {},
202
- snt: Sentinel = None,
203
- profiling: bool = False,
204
- is_async: bool = None,
205
- ):
206
- """
207
- Creates walker instance, primes walker on node, executes walker,
208
- reports results, and cleans up walker instance.
209
- """
210
- self.reset_profiling(profiling)
211
- wlk = self.yielded_walkers_ids.get_obj_by_name(name, silent=True)
212
- if wlk is None:
213
- wlk = snt.run_architype(
214
- name=name, kind="walker", caller=self, is_async=is_async
215
- )
216
- if wlk is None:
217
- return self.bad_walk_response([f"Walker {name} not found!"])
218
- res = self.walker_execute(
219
- wlk=wlk, prime=nd, ctx=ctx, _req_ctx=_req_ctx, profiling=profiling
220
- )
221
- wlk.register_yield_or_destroy(self.yielded_walkers_ids)
222
- return res
223
-
224
- @Interface.private_api(cli_args=["name"], url_args=["name"])
225
- def wapi(
226
- self,
227
- name: str,
228
- nd: Node = None,
229
- ctx: dict = {},
230
- _req_ctx: dict = {},
231
- snt: Sentinel = None,
232
- profiling: bool = False,
233
- ):
234
- """
235
- Walker individual APIs
236
- """
237
- self.reset_profiling(profiling)
238
- return self.walker_run(name, nd, ctx, _req_ctx, snt, profiling)
239
-
240
- @Interface.public_api(cli_args=["wlk"])
241
- def walker_summon(
242
- self,
243
- key: str,
244
- wlk: Walker,
245
- nd: Node,
246
- ctx: dict = {},
247
- _req_ctx: dict = {},
248
- global_sync: bool = True,
249
- ):
250
- """
251
- Public api for running walkers, namespace key must be provided
252
- along with the walker id and node id
253
- """
254
- if key not in wlk.namespace_keys().values():
255
- return self.bad_walk_response(["Not authorized to execute this walker"])
256
- if global_sync:
257
- # Deprecated Walkers are always synced with sentinel now
258
- pass
259
-
260
- walk = wlk.duplicate()
261
- res = self.walker_execute(
262
- wlk=walk, prime=nd, ctx=ctx, _req_ctx=_req_ctx, profiling=False
263
- )
264
- walk.destroy()
265
- return res
266
-
267
- @Interface.public_api(url_args=["nd", "wlk"], allowed_methods=["post", "get"])
268
- def walker_callback(
269
- self,
270
- nd: Node,
271
- wlk: Walker,
272
- key: str,
273
- ctx: dict = {},
274
- _req_ctx: dict = {},
275
- global_sync: bool = True,
276
- ):
277
- """
278
- Public api for running walkers, namespace key must be provided
279
- along with the walker id and node id
280
- """
281
-
282
- return self.walker_summon(
283
- nd=nd,
284
- wlk=wlk,
285
- key=key,
286
- ctx=ctx,
287
- _req_ctx=_req_ctx,
288
- global_sync=global_sync,
289
- )
290
-
291
- def destroy(self):
292
- """
293
- Destroys self from memory and persistent storage
294
- """
295
- for i in self.spawned_walker_ids.obj_list():
296
- i.destroy()
297
-
298
- def bad_walk_response(self, errors=list()):
299
- return {"report": [], "success": False, "errors": errors}
@@ -1,77 +0,0 @@
1
- """
2
- Webhook API
3
- """
4
-
5
- from jaseci.extens.api.interface import Interface
6
- from fastapi import HTTPException
7
- from jaseci.jsorc.jsorc import JsOrc
8
- from jaseci.extens.svc.stripe_svc import StripeService
9
-
10
- import stripe as _stripe
11
-
12
-
13
- class WebhookApi:
14
- """
15
- Webhook API
16
- """
17
-
18
- @Interface.public_api(url_args=["provider"], allowed_methods=["post"])
19
- def webhook(self, provider: str, _req_ctx: dict = {}):
20
- """Handle webhook logic"""
21
- req_body = _req_ctx["body"]
22
-
23
- if provider == "stripe":
24
- stripe_service = JsOrc.svc("stripe", StripeService)
25
- stripe = stripe_service.poke(_stripe)
26
-
27
- # to be updated
28
- stripe_service.get_event(
29
- self._h.get_file_handler(_req_ctx["raw"]).to_bytes(),
30
- _req_ctx["headers"],
31
- )
32
-
33
- payload_obj = req_body.get("data").get("object")
34
- payload_meta = payload_obj.get("metadata")
35
-
36
- customer_id = payload_obj.get("customer")
37
- customer_meta = (
38
- stripe.Customer.retrieve(id=customer_id).get("metadata")
39
- if customer_id
40
- else {}
41
- )
42
-
43
- master_id = payload_meta.get("master") or customer_meta.get("master")
44
- master = self._h.get_obj(master_id, master_id)
45
-
46
- node_id = payload_meta.get("node") or customer_meta.get("node")
47
- if not node_id:
48
- node_id = master.active_gph_id
49
- node = self._h.get_obj(master_id, node_id)
50
-
51
- sentinel_id = (
52
- payload_meta.get("sentinel")
53
- or customer_meta.get("sentinel")
54
- or master.active_snt_id
55
- or self._h.get_glob("GLOB_SENTINEL")
56
- )
57
- sentinel = self._h.get_obj(
58
- master_id,
59
- (
60
- self._h.get_glob("GLOB_SENTINEL")
61
- if sentinel_id == "global"
62
- else sentinel_id
63
- ),
64
- )
65
-
66
- payload = {"event": req_body}
67
- self.seek_committer(master)
68
-
69
- wlk = stripe_service.get_walker(req_body["type"])
70
-
71
- return master.walker_run(
72
- name=wlk, nd=node, ctx=payload, _req_ctx=_req_ctx, snt=sentinel
73
- )
74
- else:
75
- raise HTTPException(
76
- status_code=400, detail=str(provider + " webhook is not yet supported")
77
- )
File without changes