When using AWS S3 for remote file storage, the maintenance flag is written to remote storage. If the cron service is started while maintenance mode is enabled (ex. restarting the container or starting up a new container during the deployment), the cron service will correctly pick up that maintenance mode is enabled. However, the remote storage adapter is a cached adapter; the next time the file existence is checked, the value is still in cache and a false positive is returned for maintenance mode.
When using AWS S3 for remote file storage, the maintenance flag is written to remote storage. If the cron service is started while maintenance mode is enabled (ex. restarting the container or starting up a new container during the deployment), the cron service will correctly pick up that maintenance mode is enabled. However, the remote storage adapter is a cached adapter; the next time the file existence is checked, the value is still in cache and a false positive is returned for maintenance mode.