Retired Entity Changes not Refreshing in the Same Browser Session

Hello!

I am using Shotgun webhooks to trigger on certain events and perform some actions using my own script. My script is using the python api. I am setting the session_uuid in the python API for my Shotgun instance so that any updates I make are updated automatically in the user’s browser session.

I am seeing that for most events, I do see that the updated data in the browser does flash and refresh without requiring a browser refresh. However, for retired entity events, these changes require a manual browser refresh for the changes to be reflected on screen. I am wondering if this is expected behavior or if there is a way to get data to automatically refresh in this scenario.

Thank you!

1 Like

Hi @echao,

The SSUID mechanism you’re leveraging isn’t specific to Webhooks, it actually underlies AMIs, the ShotgunEventDaemon or any other API interaction.

In a nutshell, each web browser tab has it’s session_uuid and on some key GUI interactions, a poller is started that looks at the stream of EventLogEntry records for any record that shares the same token. If your script provides this SSUID when it talks back to Shotgun and the poller is still active (it tails off exponentially and eventually stops), you get the green blip and updated data.

What you should know is that the poller specifically looks for *_Change type events. This means that if you create a new record or retire a record, it won’t just appear or disappear from the page. It had originally been judged that the sudden appearance or disappearance of records might be too jarring and these types of creation and retirement events were excluded.

I don’t think this behaviour will change in the context of the current Webhooks beta because it is very much a core Shotgun web application behaviour. I’ll still mention it to @zoe.glynn and the team.

Finally, I suggest you submit a feature request to our product team through their roadmap should you like to see retirements also be taken into account in this visual feedback system.

1 Like

Hi

I would also look to have the ability of refreshing the page when the event is to retire an entity.
To maintain the integrity of our Pipeline we need to make sure some entities are retired via our custom actions. If we were able to refresh the browser, then the AMI/Webhook integration would be very user friendly.

Many Thanks

Jacob