Running wiki-to-print on the server: Difference between revisions

From creative crowd wiki
Jump to navigation Jump to search
Line 16: Line 16:
===For debugging (on the server)===
===For debugging (on the server)===


Wiki-to-print is installed on CC at:
Stop the wiki2print service:
 
$ sudo service wiki2print stop
 
Then run wiki-to-print manually from the folder where it is installed. First go to this folder:


  $ cd /var/www/wiki2print/web-interface/
  $ cd /var/www/wiki2print/web-interface/


To get error logs, you can run the flask application directly with:
And then run the application:


  $ make server
  $ make server


If you add prints statements in the python files you can see the result in the terminal.
And if needed, you can add print statements in the python files to dive deeper into the code.


===For debugging (through a local installation)===
===For debugging (through a local installation)===

Revision as of 09:13, 22 August 2023


Running wiki-to-print as a background process

Wiki-to-print is a Flask application that runs in the background as a service, using a systemd service file.

$ sudo service wiki2print status
$ sudo service wiki2print start
$ sudo service wiki2print stop
$ sudo service wiki2print restart

The service is configured at: /etc/systemd/system/wiki2print.service

For debugging (on the server)

Stop the wiki2print service:

$ sudo service wiki2print stop

Then run wiki-to-print manually from the folder where it is installed. First go to this folder:

$ cd /var/www/wiki2print/web-interface/

And then run the application:

$ make server

And if needed, you can add print statements in the python files to dive deeper into the code.

For debugging (through a local installation)

$ git clone ssh://gitea@vvvvvvaria.org:12345/varia/wiki-to-print.git
$ cd wiki-to-print/wiki-to-print/web-interface/
$ make setup
$ make local

jobrunner

There is a script called jobrunner.sh in /var/www/html/wiki/ that is based on: https://www.mediawiki.org/wiki/Manual:Job_queue#Continuous_service

It runs the MediaWiki jobs every 10 seconds.

It is installed on CC and runs in the background as a system-d service, called "jobrunner", which can be used with:

$ sudo service jobrunner status
$ sudo service jobrunner start
$ sudo service jobrunner stop
$ sudo service jobrunner reload

The service is configured at: /etc/systemd/system/jobrunner.service