News:

Join the Facebook Fan Page.

Main Menu

Upgrading the big forum

Started by Helgi, March 04, 2023, 04:54:23 PM

Previous topic - Next topic

Helgi

If the database takes several gigabytes, updating SMF (for example, from 1.1.21 to 2.1.3) takes a long time. And what's most unfortunate is that you have to periodically use manual labor on "Click here to try again".
Increasing the number in $timeLimitThreshold does not help much.
Updating through the command line also periodically stops.

A little Python script can come to the rescue.

I wrote it in a few minutes. The forum will now be updated automatically.  It's easy to use. :)

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
browser = webdriver.Edge()
browser.get("https://smf.com/upgrade.php")
wait = WebDriverWait(browser, 10)
while True:
    try:
        button = browser.find_element(By.CSS_SELECTOR, "div#error_message a")
        button.click()
    except:
        pass
while True:
    pass
You can replace Edge with Chrome or another browser.

Arantor

Me, I use the command line to run the upgrade, no timeouts there... but yeah, neat trick with Selenium.
Holder of controversial views, all of which my own.

Varlov

I suppose I've been spoiled by using Softaculous!  :P

Kindred

Softaculous and every other one-click installer are terrible...  they often overwrite your system customizations using the "full upgrade" version of the software
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

marcimila

Quote from: Arantor on March 04, 2023, 05:04:19 PMMe, I use the command line to run the upgrade, no timeouts there... but yeah, neat trick with Selenium.

How do you use the command line to upgrade your big forum? I was the same problem, but now I can't use the Find and repair any errors, because I receive timeouts.

Arantor

You can run the upgrader from the command line. Find/repair is not available from command line though.
Holder of controversial views, all of which my own.


Advertisement: