catalyst / moodle-auth_outage

Planned, graduated user and admin friendly moodle outages
https://moodle.org/plugins/auth_outage
17 stars 33 forks source link

Eliminate negative hits to climaintenance.php #204

Open brendanheywood opened 4 years ago

brendanheywood commented 4 years ago

gluster is slower on a file_exists('climaintenance.php') if the file doesn't exist, so lets do a couple things:

1) instead of deleting the file, create the file but with a php noop in it 2) the file_exists will still happen and capture the edge cases before it exists but be faster now 3) replace logic around if the file exists, to 'if the file exists and is not a noop'

see also https://tracker.moodle.org/browse/MDL-67821