Plugin Settings

Validity has some settings which can be changed through PLUGINS_CONFIG variable inside your configuration.py.

Settings

sleep_between_tests

Default: 0.0

Type: float

The amount of seconds system will wait between executing each Compliance Test.

Compliance Test execution may cause a lot of DB queries, because Compliance Test is dynamic by its nature and the system cannot prefetch all the required DB data before the test. If you're realizing that Run Compliance Tests script overwhelms your DB with a lot of queries, you can adjust this setting to spread the queries over time.

result_batch_size

Default: 500

Type: int

Execution of the Tests and producing Test Results is carried out in batches. As soon as each batch reaches its maximum size (specified via this variable) all the Test Results within a batch will be uploaded into a DB.

store_reports

Default: 5

Type: int

How many Reports should the system store.

If the system creates a new Report and the overall reports count exceeds store_reports, then the oldest exceeding report(s) will be deleted.

Note

Test Results bound to the Report will be deleted with this Report.

store_last_results

Default: 5

Type: int

How many Test Results should the system store for each pair of Compliance Test and Device.

Run Compliance Tests script checks this setting after creating a new bunch of Test Results. If there are old Test Results that exceed store_last_results for some pair of (Device, Compliance Test), then the script will delete them.

Note

This setting does not influence Test Results bound to a Report. These results can be deleted only together with the Report they are bound to.

Settings Example

Here is the full example of Validity settings:

# configuration.py

PLUGINS_CONFIG = {
    'validity': {
        'sleep_between_tests': 0.02,
        'result_batch_size': 300,
        'store_reports': 7,
        'store_last_results': 8,
    },
    # other plugins configuration
}