ProfessionalWiki / PersistentPageIdentifiers

MediaWiki extension that adds persistent identifiers to wiki pages
https://professional.wiki/en/extension/persistent-page-identifiers
GNU General Public License v2.0
1 stars 0 forks source link

Add maintenance script logic #33

Closed malberts closed 1 week ago

malberts commented 1 week ago

For #7 #25

This can be cleaned up and made more testable, but this seems to be the minimal core logic to generate persistent IDs for pages without them.

The biggest improvement, if necessary, would be some kind of batching/limit or timeout in case there are huge amounts of pages.

Manual testing with pages created before enabling the extension: Screenshot_20241113_231229

malberts commented 1 week ago

I added batching for fetching, and then it inserts that same batch at once. I don't think it's worth having a different batch size for retrieving and inserting.

However, I am now running into issues where CI fails on at least MW 1.41, although 1.39 passes locally. On 1.41's release notes they mention insert() was made internal:

IDatabase::insert() Use InsertQueryBuilder instead. Right now I'm not sure if there was some other change related to query exceptions that changed there.

JeroenDeDauw commented 1 week ago

Will do more through review when my brain works again tomorrow