diff --git a/argos/server/models.py b/argos/server/models.py index c0c3d01..065fc33 100644 --- a/argos/server/models.py +++ b/argos/server/models.py @@ -1,4 +1,5 @@ """Database models""" + from datetime import datetime, timedelta from typing import List, Literal @@ -87,12 +88,12 @@ class Task(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 - depends on the return value of the check. + You can read `status` as "Was the agent able to do the check?" + while the `severity` depends on the return value of the check. """ __tablename__ = "results" @@ -120,14 +121,16 @@ class Result(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. - There is currently two cached settings: + This is used to determine if tasks are to be updated. + + These settings are cached: - general_frequency: the content of general.frequency setting, in minutes ex: 5 - - websites_hash: the sha256sum of websites setting, to allow a quick - comparison without looping through all websites + - websites_hash: the hash (sha256sum) of websites setting, to allow a quick + comparison without looping through all websites. ex: 8b886e7db7b553fe99f6d5437f31745987e243c77b2109b84cf9a7f8bf7d75b1 """