203 Commits

Author SHA1 Message Date
Raman Gupta
a4d28791ed server: python rpc should use create_task instead of run_coroutine_threadsafe (#1953)
run_coroutine_threadsafe is designed for scheduling coroutines from a
different thread onto the event loop. Since readLoop is already running
as an async function on the event loop, using create_task is the correct
and more efficient approach.

This removes unnecessary thread-safe queue overhead for every RPC message.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 09:34:44 -08:00
Koushik Dutta
4ad594074a server: remove python cluster mode port logging 2025-11-09 08:23:06 -08:00
Koushik Dutta
dea55e4fcd server: fix bug in connectRPCObject 2025-08-26 16:30:01 -07:00
Brett Jia
eaabd02bfe server: bind single address if cluster address is 127.0.0.1 (python) (#1877)
A continuation of https://github.com/koush/scrypted/pull/1820 for the missing Python half.
2025-08-26 09:23:32 -07:00
Koushik Dutta
cc78c072ce rpc: support pickling 2025-07-31 20:54:48 -07:00
Koushik Dutta
48c489b898 rpc: support dataclasses annotation, fix formatting 2025-07-31 11:05:55 -07:00
Koushik Dutta
2cbcc05428 server: formatting 2025-07-31 11:04:16 -07:00
Vitor Furlanetti
b72c8f59eb server: Fallback pip to latin (#1841) 2025-07-02 21:34:29 -07:00
Brett Jia
19832c9537 python: partial repl reimplementation (#1763)
* python: partial repl reimplementation

* make more readable?

* document questionable design choices
2025-03-04 14:37:55 -08:00
Koushik Dutta
fe1b677381 server: limit address binding in cluster mode 2025-03-02 14:57:56 -08:00
Koushik Dutta
df10c4e5f2 server: fixup address, make it available on cluster manager 2025-02-05 12:08:50 -08:00
Brett Jia
3416347a1f server/python: fix hash calculation (#1720) 2025-02-01 19:28:17 -08:00
Koushik Dutta
93f94b0b0a server: Fixup casing 2024-12-30 21:29:15 -08:00
Koushik Dutta
404cf47d2e server: make mediaManager cluster aware 2024-12-30 21:28:06 -08:00
Brett Jia
55cb62cb72 server: use standard-telnetlib for Python 3.13+ (#1669)
* bump portable-python to version with 3.13

* add standard-telnetlib to scrypted requirements for Python 3.13+
2024-12-29 14:22:32 -08:00
Koushik Dutta
0b04d92131 server: use site packages in python for debugging 2024-12-28 13:24:40 -08:00
Koushik Dutta
05e9627f4a server: add debugpy to install list 2024-12-28 13:09:47 -08:00
Koushik Dutta
9098426c3b server: add rpc support for shallow serialized arrays 2024-12-22 12:16:10 -08:00
Koushik Dutta
0d9d425ef0 server: fix python search order 2024-12-22 12:05:33 -08:00
Koushik Dutta
01493e311d server: fix repl in cluster mode 2024-12-06 12:46:49 -08:00
Koushik Dutta
b4aa20b4cd server: remove legacy storage event 2024-12-05 09:24:36 -08:00
Koushik Dutta
b1b0dd8997 server: fix non cluster crash 2024-12-02 15:41:42 -08:00
Koushik Dutta
a75b263141 server: cluster cpu usage monitoring 2024-12-02 15:08:56 -08:00
Koushik Dutta
dcae7ce367 server: remove debug code causing crashes 2024-11-23 08:05:17 -08:00
Koushik Dutta
d26c595fd6 server: clean up clustering lifecycle management 2024-11-22 20:57:34 -08:00
Koushik Dutta
2c5b79291f server: python formatting 2024-11-21 14:53:16 -08:00
Koushik Dutta
53cab91b02 server: refactor runtime worker creation 2024-11-20 14:53:58 -08:00
Koushik Dutta
69f4de66e9 server: exit hooks for python fork 2024-11-20 12:18:25 -08:00
Koushik Dutta
aed6e0c446 server: wip cluster mode load balancing 2024-11-20 11:39:21 -08:00
Koushik Dutta
347a957cd3 sdk: add cluster manager 2024-11-20 10:10:47 -08:00
Koushik Dutta
459b95a0e2 server: python cluster worker routing 2024-11-18 21:33:49 -08:00
Koushik Dutta
ca243e79bb server: apply default runtime for cluster fork 2024-11-18 21:03:00 -08:00
Koushik Dutta
153cc3ed94 server: python cleanup 2024-11-18 12:26:46 -08:00
Koushik Dutta
2ae6113750 server: wip python cluster fork 2024-11-18 11:31:52 -08:00
Koushik Dutta
0bf0ec08ab server: plugin init cleanups 2024-11-15 23:40:38 -08:00
Koushik Dutta
d868c3b3bb server: remove stats checker 2024-11-15 22:43:19 -08:00
Koushik Dutta
953b7812c5 server: shuffle python cluster code 2024-11-15 19:53:16 -08:00
Koushik Dutta
a965f9b569 server: simplify pong 2024-11-15 10:02:13 -08:00
Koushik Dutta
ce10a49f0f server: fix ping/pong 2024-11-15 10:02:13 -08:00
Koushik Dutta
5e31a0db96 server: python cleanup 2024-11-15 10:02:13 -08:00
Koushik Dutta
670216135b server: fix python stats updater 2024-11-15 10:02:13 -08:00
Koushik Dutta
09b9b33bac server: working python clustering 2024-11-15 10:02:13 -08:00
Koushik Dutta
02d090cb94 server: fix python cluster server loop missing 2024-11-15 10:02:13 -08:00
Koushik Dutta
7d28d1d9d4 server: wip python clustering 2024-11-15 10:02:13 -08:00
Koushik Dutta
f69b93c9fa server: fix consoles in clustered environment 2024-11-15 10:02:13 -08:00
Koushik Dutta
c3148b8ed9 server: disable nan serialization completely in python 2024-11-10 12:30:05 -08:00
Koushik Dutta
bc95a15f89 Revert "server: do not serialize python nan in rpc protocol."
This reverts commit e9d73c6faa.
2024-11-10 12:29:26 -08:00
Koushik Dutta
e9d73c6faa server: do not serialize python nan in rpc protocol.
This causes protocol failure and plugin to be killed. Javascript behavior is to convert NaN to null.
Mimicing this behavior ensures stability though all JSON dicts are recursively inspected.
2024-10-31 10:44:08 -07:00
Brett Jia
a4e484698d server: implement python listen + listenDevice (#1587)
* server: implement python listen + listenDevice

* fix unregister

* make functions synchronous
2024-09-23 09:34:10 -07:00
Brett Jia
d01fe4310b server: python createMediaManager func (#1574)
* server: python createMediaManager func

* use api's media manager directly
2024-09-12 13:08:03 -07:00