Example: Site Explanation:
- Two super administrators SA1 SA2
- An update button will appear on the control panel when they enter the admin panel.
Is required
When SA1 clicks the Refresh button, it will take 15 minutes to complete the task. Consider while the process is in progress, & SA2 is logged in, it should find out SA1 has already pressed the refresh button until it is finished, SA2 will not be able to click on it.
What I've done
Created table 'button_status' [id, status (' complete ',' uncomplete ')] every time SA1 or SA2 clicks the update button, I insert a new record with status as'incomplete' until I show the process in which to load the image and disable the update button for SA1 and SA2, as soon as the process receives the end after 10 coins. I am updating the status for the last entry to complete. and deleting the downloaded image and turning on the refresh button.
Everything works fine, the problem is loading the image or the disabled button for other admin who didn’t click the refresh button, I can’t delete it, because for this I need to refresh the page. Is there a way to show completion automatically when for another administrator without refreshing the page after the “full” status updated in db?
source share