5 Commits

Author SHA1 Message Date
Eric Callahan
b8388db18d
klippy_connection: improve subscription request handling
If the connection requesting the subscription already had
an outstanding subscription, remove it before processing.
This prevents immediate status updates from being pushed
to the requesting connection.

Don't add connections to the dictionary of subscribed
connections if the request is an empty object, as this
is a request to unsubscribe from all objects.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-07 06:08:49 -05:00
Eric Callahan
9097cfcce7 klippy_connection: store klipper source path and python path
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 16:35:37 -04:00
Eric Callahan
896cd8c41e
klippy_connection: exclude configfile attrs from subscription cache
The configfile "config" and "settings" attributes never change, and
therefore do not need to be stored in the subscription cache.  They
can be significantly large, so this change can free up some memory
on low resource systems.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-01-28 05:55:50 -05:00
Eric Callahan
c4f1d251c3
klippy_connection: add support for service info fallback
If Klipper is using systemd socket activation to generate its
unix socket the PID reported by PEERCRED will be 1, that of
systemd itself.  Klipper now reports its process id in the
"info" endpoint, use that as a fallback to retreive service info.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-01-15 12:20:05 -05:00
Eric Callahan
ddd735feba
refactor: convert klippy_connection into a component
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-01-13 15:15:15 -05:00