Merge pull request #3765 from 0xDEADFED5/ticker2

rebuild TickerHandler store_key if it's been serialized
This commit is contained in:
Griatch 2025-04-26 11:39:05 +02:00 committed by GitHub
commit 43d1a36203
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -564,6 +564,10 @@ class TickerHandler(object):
if not store_key: if not store_key:
obj, path, callfunc = self._get_callback(callback) obj, path, callfunc = self._get_callback(callback)
store_key = self._store_key(obj, path, interval, callfunc, idstring, persistent) store_key = self._store_key(obj, path, interval, callfunc, idstring, persistent)
else:
if isinstance(store_key, tuple) and not isinstance(store_key[0], tuple):
obj, path, callfunc = self._get_callback(getattr(store_key[0], store_key[1]))
store_key = self._store_key(obj, path, store_key[3], callfunc, store_key[4], store_key[5])
to_remove = self.ticker_storage.pop(store_key, None) to_remove = self.ticker_storage.pop(store_key, None)
if to_remove: if to_remove:
self.ticker_pool.remove(store_key) self.ticker_pool.remove(store_key)