Tool:SDBot

From Wikitech
Jump to navigation Jump to search
Toolforge tools
Crystal Clear app package utilities.png
Website https://sdbot.toolforge.org/
Description Bot for managing deletion discussions at no.wikipedia.org
Keywords python
Maintainer(s) Danmichaelo (View all)
Source code https://github.com/danmichaelo/SDBot
License MIT License
Admin log Tools.sdbot/SAL

SDBot is a bot that automates some of the grunt work related to articles for deletion at no.wikipedia.org: updating the list of articles for deletion, archiving completed discussions and adding templates to discussion pages. Logs can be viewed at https://sdbot.toolforge.org/

Maintenance


$ ssh login.toolforge.org
$ become sdbot
:# Update from github (authenticates using a password-less read-only deployment key in .ssh/id_ed25519)
$ git pull

:# (Re)start the webservice
$ webservice restart

:# If changes have been made to jobs.yaml, load the new version
$ toolforge-jobs load jobs.yaml

:# Verify that jobs  have been loaded
$ toolforge-jobs list --long

:# Manually running the bot
$ toolforge-jobs run adhoc-job --command "./jobs/run.sh" --image tf-python39

: # Update to a new Python image (e.g. from Python 3.9 to 3.10):
$ toolforge-jobs run bootstrap-venv --command "./jobs/bootstrap-venv.sh" --image tf-python310 --wait
$ sed -i '' 's/tf-python39/tf-python310/' jobs.yaml
$ toolforge-jobs load jobs.yaml
$ sed -i '' 's/python3.9/python3.10/' service.template
$ webservice restart