senaite.autopublish¶
This add-on enables the automatic and asynchronous publishing of results reports for SENAITE LIMS, especially indicated for the unattended publication of large amounts of samples with minimum impact on site performance.
This documentation is divided in different parts. We recommend that you get started with Installation and then head over to the Quickstart.
Table of Contents:
Installation¶
This add-on depends on senaite.queue. If you don’t have this add-on installed yet, please follow the Installation instructions of senaite.queue first.
senaite.autopublish makes use of Selenium WebDriver, a well-known tool used for browser testing automation. Although this tool supports several browser drivers, senaite.autopublish only supports chromedriver. You have to manually install the chrome browser and the chrome driver first. Please, refer to chromedriver versions selection documentation for further details.
senaite.autopublish runs the browser in headless mode, but a graphical interface in place in your system is required. Since your SENAITE LIMS instance is probably running in a server without graphical interface, we suggest to install xvfb , a virtual framebuffer X server.
To install senaite.autopublish in your SENAITE instance, add this add-on in the eggs section of your buildout configuration file as follows, and run bin/buildout afterwards:
[instance]
...
eggs =
...
senaite.autopublish
With this configuration, buildout will download and install the latest published release of senaite.autopublish from Pypi, as well as the Selenium python package, that provides python language bindings for Selenium WebDriver.
Once buildout finishes, start the instance, login with a user with “Site Administrator” privileges and activate the add-on:
http://localhost:8080/senaite/prefs_install_products_form
Note
It assumes you have a SENAITE zeo client listening to port 8080
Quickstart¶
This section gives an introduction about senaite.autopublish. It assumes you have SENAITE LIMS and senaite.autopublish already installed, with a reserved zeo client listening at port 8089 and a regular zeo client listening at port 8080. Please read the Installation for further details.
Control panel¶
Visit the control panel view for senaite.autopublish to configure the settings. This control panel is accessible to users with Site Administrator role, through “Site Setup” view, “Add-on Configuration” section:
http://localhost:8080/senaite/@@autopublish-controlpanel
Note
It assumes you have a SENAITE zeo client listening to port 8080
From this control panel view you can define the following settings:
- Timeout: the maximum number of seconds the system will wait for a URL to complete while generating the results report. A default value of works for most instances, but consider to increase this value when there are too many failures in the queue monitor view or TimeoutException appears too often in the zeo client’s log.
- Base URL: SENAITE’s url of the zeo client to use for the generation of results reports. This url is called by the queue’s zeo client. For instance, with a value of http://localhost:8081/senaite, the automatic results report generation will be done by the client listening at port 8081. If this setting is empty, the generation of results reports will by handled by queue’s zeo client.
Auto-publish samples¶
Login as a SENAITE regular user with enough privileges to publish samples. Be sure you have some samples in “verified” status. Go to Samples listing, and click to the “Verified” filter button (at the top of the list). Select some samples and a button “Auto publish” will be displayed at the bottom of the list.
Press the “Auto publish” button at the bottom and a confirmation view is displayed:

Once the “Confirm” button is pressed, the system delegates the publication process of the selected samples to senaite.queue. These samples will be eventually published. Meanwhile, a progress icon is displayed next to them in listings.
Monitoring¶
You can keep track of the samples that are in the publishing queue from the top-right “hamburger” menu, link “Queue Monitor”:
http://localhost:8080/senaite/queue_tasks
From this view you can cancel the auto-publication of individual samples or see the details of each task. Visit the Documentation of senaite.queue for further details.