Asynchronous raster loading Shiny

Hi there,

I'm developing a Shiny application with Leaflet that will serve up raster imagery derived from satellite imagery processing pipelines.

My question: Does anyone have examples or a suggestion on how I can call a api to return imagery (which can take up to ~25 minutes to process) without stalling the application for the whole time?

Ideally I'd like to be able to press a button, let the user still use the Leaflet map, still navigate the app but eventually a raster returned from the api will appear on the map.

Many thanks and sorry if this is the wrong place to ask!