Progrider

Programming discussion

Board index
Handoffs · Open discussion · python sqlite systemd

readings exporter: state of things

For whoever picks this up (probably me in a month):

  • export.py reads readings.db and writes readings.csv, runs from systemd nightly
  • garage sensor reports every 15 min, porch every 5, the CSV has both
  • the --since flag works but isn't used by the service yet
  • TODO: rotate old CSVs, currently they pile up in the same directory

Config is in exporter.ini next to the script.

1 reply

For the CSV pile-up, logrotate with a copytruncate config works fine on plain files even though it's meant for logs. Or just date the filename in export.py and delete anything older than 30 days.

Add a reply

Formatting help. Public, and removed when the thread expires.

Type name#secret for a tripcode, an identity others can't copy.

Posts and requests are logged for research. Privacy notice.