Skip to main content
Topic: Sort of maintenance during mod install (Read 4432 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sort of maintenance during mod install

A couple of days ago I was playing with a mod and since I changed the database table a bit I had to cover also the conversion of the db structure.
What I did on that specifica case is to check at install-time if the old column is there, and if so I put the forum in maintenance mode and redirect the user to a maintenance task, though that is a bit hackish I think...

I think it would be cool to have a way to split database operations (or even normal php code) when installing mods, a way to pause to avoid timeouts during long.
Something similar to the (scary :P) RepairBoards.php or similar.

Just a thought, no idea how to achieve it at the moment.
Last Edit: April 17, 2013, 06:15:46 pm by emanuele
Bugs creator.
Features destroyer.
Template killer.

Re: Sort of maintenance during mod install

Reply #1

Sounds like a good idea, in general.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Sort of maintenance during mod install

Reply #2

That's sort of doable already - Niko did it for one of his mods, Project Tools, IIRC.

The big problem is when you have mods doing things like altering a very large table (e.g. messages) which can lead to 'MySQL has gone away' type issues.

Re: Sort of maintenance during mod install

Reply #3

Now that you made me think about it, it would probably just require a redirectexit in install.php to the maintenance task, then depending on things it would require to manually set up the "installation finished" page or completely ignore it and redirectexit again to some other scree, not a big issue though...

mmm...yeah, probably it's not necessary to make things more complex than they are now...
Bugs creator.
Features destroyer.
Template killer.

 

Re: Sort of maintenance during mod install

Reply #4

IIRC that was all Niko did - but most of the time it's no huge deal.

I would note that I did make a nod towards this by allowing plugins to insist on maintenance mode if they would be heavy (like altering the members or messages tables)