Celery works as expected-- But now users see old page state...How handle?

I successfully moved a lot of Django work into Celery tasks. It works exactly as it should.

However! Because lots of work is delayed, users now see pages in old states. I understand why that happens, but, I fear some users might get confused. How do people handle this?

For example, without Celery, assume Django blocks until data is all processed before sending users to a page X displaying that data. However, now with Celery updating the data, users can land on page X before Celery has completed updating the relevant data!? That is one example but there are others. The common denominator is the fear the new behavior with Celery might confuse users. Any help greatly appreciated.

Sincerely,

Chris

Three approaches I have used in the past.

  • Track a “last-updated” date for key data. Include a message on the page to the effect of “Data is current as of <most recent updated date/time>” or “Page last updated at <most recent date/time>”. If they’re involved with updating the data or are aware that data is constantly being updated, they should be able to realize that information may not be up to the current second.

  • Add a flag / marker / indicator / etc to key models that allows you to track activity, and add a message saying updates are in progress and what you’re looking at may not be current.

  • Simply document the fact that processing current data takes time, and that what you’re looking at on the page may be as much as xxx minutes behind.