Skip to main content

main

module core.main


function run

run()None

The entrypoint of PYRA Core.

This function infinitely loops over a sequence of modules:

  1. Read the config

  2. Check whether HeliosThread and UploadThread are running

  3. Possibly start/stop the threads according to the config

  4. Run MeasurementConditions module

  5. Run EnclosureControl module

  6. Run SunTracking module

  7. Run OpusMeasurement module

  8. Run SystemChecks module

The mainloop logs all exceptions and sends out emails when new exceptions occur and when all exceptions have been resolved.

Terminology: modules are executed one by one in each mainloop iteration. Threads are executed in parallel to the mainloop and are started/stopped according to the config.