When there are updates available for Drupal, I enable the maintenance mode, update, and disable the maintenance mode again.
As far as I understand it, users that were right in the middle of editing a node or checking out their shopping cart would lose their content/progress because of the maintenance break.
One solution could be to notify all online users that they should save their content, however, this would not work for users that are checking out right now (e.g., filling in the shipping data or being in the payment process).
Ideally, when trying to enable the maintenance mode, Drupal should warn me that users are currently active on the site.
Is this possible? Can Drupal detect that someone (be it a registered or an anonymous user) is "active", even if the user might have been afk/inactive for some time (e.g., searching for the credit card)? Possible indications could be: opened a node edit form but no submission or further request detected; started but not finished the checkout; added products to the cart without checking out; etc.
If yes, how could I achieve this? I’m not experienced enough to write this from scratch, so hopefully this doesn’t involve creating a totally new module. Does there exist a module for this purpose?