ayon-backend icon indicating copy to clipboard operation
ayon-backend copied to clipboard

Notify clients when attribute enums change

Open martastain opened this issue 10 months ago • 0 comments

Story

Attributes enums may change and server restart is no longer needed. However the front end uses a cached attribute list to display dropdowns, so a page refresh is required. (mentioned here https://github.com/ynput/ayon-core/pull/350#issuecomment-2036290083 )

That leads to unnecessary wear of users' F5 keys.

Proposed solution

When an attribute enum changes, attribute_library.load() is called. This is for a planned Redis caching of the attribute list. Upon re-caching we may dispatch a fire-and-forget system.attributes_changed event, which would notify the connected clients and they may fetch the new configuration.

martastain avatar Apr 04 '24 09:04 martastain