@motiadev/core 0.1.0-beta.24 → 0.1.0-beta.26
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.
|
@@ -27,7 +27,11 @@ class Context:
|
|
|
27
27
|
self.rpc = rpc
|
|
28
28
|
self.state = RpcStateManager(rpc)
|
|
29
29
|
self.logger = Logger(self.trace_id, self.flows, rpc)
|
|
30
|
-
|
|
30
|
+
try:
|
|
31
|
+
self._loop = asyncio.get_running_loop()
|
|
32
|
+
except RuntimeError:
|
|
33
|
+
self._loop = asyncio.new_event_loop()
|
|
34
|
+
asyncio.set_event_loop(self._loop)
|
|
31
35
|
self.is_api_handler = is_api_handler
|
|
32
36
|
self._pending_tasks = []
|
|
33
37
|
|
|
@@ -141,6 +145,10 @@ if __name__ == "__main__":
|
|
|
141
145
|
arg = sys.argv[2] if len(sys.argv) > 2 else None
|
|
142
146
|
|
|
143
147
|
rpc = RpcSender()
|
|
144
|
-
|
|
148
|
+
try:
|
|
149
|
+
loop = asyncio.get_running_loop()
|
|
150
|
+
except RuntimeError:
|
|
151
|
+
loop = asyncio.new_event_loop()
|
|
152
|
+
asyncio.set_event_loop(loop)
|
|
145
153
|
tasks = asyncio.gather(rpc.init(), run_python_module(file_path, rpc, parse_args(arg)))
|
|
146
154
|
loop.run_until_complete(tasks)
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@motiadev/core",
|
|
3
3
|
"description": "Core functionality for the Motia framework, providing the foundation for building event-driven workflows.",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
-
"version": "0.1.0-beta.
|
|
5
|
+
"version": "0.1.0-beta.26",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"body-parser": "^1.20.3",
|
|
8
8
|
"colors": "^1.4.0",
|