backdrop-contrib / backup_migrate

Port of the Drupal backup_migrate module to Backdrop
GNU General Public License v2.0
7 stars 14 forks source link

Switch the "last run" values from saving in config system to state system #49

Closed jenlampton closed 4 years ago

jenlampton commented 5 years ago

When I do a git status on sites running backup and migrate, I usually see three values in my config file that have changed. These are:

These are not configuration and are specific to only this single instance of the site. They should be moved to the state system.

In Drupal, this information was often mixed in with configuration since it was all stored in the database anyway, and didn't really matter. The state system is intended for exactly this type of dat, so now that we have a nice easy way to manage config, we should separate out everything that doesn't belong. :)

herbdool commented 5 years ago

@jenlampton does this commit address the issue? https://github.com/backdrop-contrib/backup_migrate/commit/3ca235ac04e1f2b0599329fef07591c04a77e5b2 - I'm not totally sure since it adds a schedule_id to the state name and can't tell if it matches those above.

jenlampton commented 5 years ago

@herbdool that handles one of the three variables, yes. It looks like all of them contain the schedule_id, so that exact same change should be duplicated for the other 2 variables also.

herbdool commented 4 years ago

It's handing it dynamically so the commit should apply to all of them already. E.g.:

state_set('backup_migrate_schedule_last_run_' . $this->get('id'), $timestamp);

I think this issue can be closed.

jenlampton commented 4 years ago

Ah, well maybe that does cover all of them. I'll update and test a few sites to see if there are any more issues. If so, I can open a new issue.