mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
[docs] Enhance models' docstrings
This commit is contained in:
parent
1948658900
commit
c4c8fbbe4d
1 changed files with 12 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
||||||
"""Database models"""
|
"""Database models"""
|
||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import List, Literal
|
from typing import List, Literal
|
||||||
|
|
||||||
|
@ -87,12 +88,12 @@ class Task(Base):
|
||||||
|
|
||||||
|
|
||||||
class Result(Base):
|
class Result(Base):
|
||||||
"""There is multiple results per tasks.
|
"""There are multiple results per task.
|
||||||
|
|
||||||
The results uses the informations returned by the agents.
|
The results store information returned by the agents.
|
||||||
|
|
||||||
The status is "Was the agent able to do the check?" while the severity
|
You can read `status` as "Was the agent able to do the check?"
|
||||||
depends on the return value of the check.
|
while the `severity` depends on the return value of the check.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__tablename__ = "results"
|
__tablename__ = "results"
|
||||||
|
@ -120,14 +121,16 @@ class Result(Base):
|
||||||
|
|
||||||
|
|
||||||
class ConfigCache(Base):
|
class ConfigCache(Base):
|
||||||
"""Contains some informations on the previous config state
|
"""Database model containing information on the current state
|
||||||
|
of the configuration.
|
||||||
|
|
||||||
Used to quickly determine if we need to update the tasks.
|
This is used to determine if tasks are to be updated.
|
||||||
There is currently two cached settings:
|
|
||||||
|
These settings are cached:
|
||||||
- general_frequency: the content of general.frequency setting, in minutes
|
- general_frequency: the content of general.frequency setting, in minutes
|
||||||
ex: 5
|
ex: 5
|
||||||
- websites_hash: the sha256sum of websites setting, to allow a quick
|
- websites_hash: the hash (sha256sum) of websites setting, to allow a quick
|
||||||
comparison without looping through all websites
|
comparison without looping through all websites.
|
||||||
ex: 8b886e7db7b553fe99f6d5437f31745987e243c77b2109b84cf9a7f8bf7d75b1
|
ex: 8b886e7db7b553fe99f6d5437f31745987e243c77b2109b84cf9a7f8bf7d75b1
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue