• D. Spindel Ljungmark's avatar
    archiver/housekeeper: Also delete items marked for expiration · 1c74bc5c
    D. Spindel Ljungmark authored
    it turns out we have a lot of data in the  `modio` set that should be removed
    once it's past the short time frame.
    
    These are data that we expect to only be interested of in the short term, like
    runtime status of services in the devices.
    
    This change allows us to specify item history points at intervals, while only a
    few really matter:
    
    - MODIO_ARCHIVE ,
      the cutoff time in days from which data is moved to cold storage.
      We expire data from this table before moving it into cold storage
    
    - 14 days,
      The cutoff time for our "fast query window",  when we drop old indexes on
      last months data.
      This number has many interactions with triggers and zabbix, and shouldn't be adjusted.
    1c74bc5c
archiver.py 18.6 KB