The HMBKP_Scheduled_Backup class has too many responsibilities.
One functionality we can abstract out is the status monitoring.
Schedules could publish status to subscribed objects using the Observer pattern. We could have a single Backup_Monitor class or whatever that would have a collection of all running backups, and handle status changes. It would maybe make it easier to have parallel running backups with Backdrop.
Why are we writing status to a file? Could it not be a DB option?
Ha, actually suggested by Scrutinizer
https://scrutinizer-ci.com/g/humanmade/backupwordpress/code-structure/master/class/%2Bglobal%5CHMBKP_Scheduled_Backup
Thoughts? @willmot
The
HMBKP_Scheduled_Backupclass has too many responsibilities.One functionality we can abstract out is the status monitoring.
Schedules could publish status to subscribed objects using the Observer pattern. We could have a single
Backup_Monitorclass or whatever that would have a collection of all running backups, and handle status changes. It would maybe make it easier to have parallel running backups with Backdrop.Why are we writing status to a file? Could it not be a DB option?
Ha, actually suggested by Scrutinizer
https://scrutinizer-ci.com/g/humanmade/backupwordpress/code-structure/master/class/%2Bglobal%5CHMBKP_Scheduled_Backup
Thoughts? @willmot