I am in the process of writing an Ansible Playbook to install and upgrade Matomo. While doing the upgrade bit I created a task to upgrade the database, using the following command:
And I was wondering what would happen if the auto-archiver was running while the database upgrade task was executed. Moreover, is there a way to safely detect and stop a currently-running auto-archiving process?
I don’t mean disabling cron (I know I have to do that at the beginning), but in case it had just started, right before going for the upgrade.
I am already doing that at the begining of my Ansible playbook. My question was about what happens when an archiving job is already running, i.e., had started prior to the task in the palybook that upgrades the database schema:
Will the running command block the database upgrade and keep the installation in maintenance mode for around 30 minutes (durrent duration of my archiving cron job)? Will the archiving job quickly detect the new maintenance mode and stop processing sites?
You would probably be better to see if the archive is running by checking the process list for core:archive. I am not sure what would happen if or even if you could go into Maintenace mode during an archive. If you could and the archive is killed it will start over as it can only mark it done when it’s done.