magemojo / m2-ce-cron

Magento 2 cron project to fix bugs and common cron issues.
https://magemojo.com
MIT License
165 stars 45 forks source link

Maintenance mode check does not work properly if remote storage is enabled #131

Open JesKingDev opened 1 year ago

JesKingDev commented 1 year ago

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.