pyobs-core 2.28.3__tar.gz → 2.29.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/PKG-INFO +1 -1
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/application.py +32 -4
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/cli/pyobs.py +14 -1
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/cli/pyobsd.py +158 -29
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/coolingramp.py +5 -0
- pyobs_core-2.29.0.dev2/pyobs/utils/shutdown.py +191 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyproject.toml +1 -1
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/.gitignore +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/LICENSE +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/README.md +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/background_task.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/cli/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/cli/_cli.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/cli/pyobsw.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/comm.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/commlogging.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/dummy/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/dummy/dummycomm.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/local/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/local/localcomm.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/local/localnetwork.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/proxy.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/rpc.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/serializer.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/xep_0009/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/xep_0009/rpc.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/xep_0009_timeout/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/xep_0009_timeout/rpc.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/xep_0009_timeout/stanza/RPC.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/xep_0009_timeout/stanza/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/xmppclient.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/comm/xmpp/xmppcomm.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/badweather.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/event.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/exposurestatuschanged.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/filewritten.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/filterchanged.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/focusfound.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/goodweather.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/log.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/modechanged.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/moduleclosed.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/moduleopened.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/motionstatuschanged.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/move.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/newdata.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/newimage.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/newspectrum.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/offsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/roofclosing.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/roofopened.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/taskfailed.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/taskfinished.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/taskskipped.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/taskstarted.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/events/testevent.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/image.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/meta/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/meta/altazoffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/meta/datapipeline.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/meta/exptime.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/meta/genericoffset.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/meta/onskydistance.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/meta/pixeloffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/meta/radecoffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/meta/skyoffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processor.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/_daobackgroundremover.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/annotation/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/annotation/_pillow.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/annotation/circle.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/annotation/crosshair.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/annotation/text.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/astrometry/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/astrometry/_dotnet_request.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/astrometry/_dotnet_request_builder.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/astrometry/_dotnet_request_logger.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/astrometry/_dotnet_response_saver.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/astrometry/astrometry.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/astrometry/dotnet.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/calibration/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/calibration/_calibration_cache.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/calibration/_ccddata_calibrator.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/calibration/calibration.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/detection/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/detection/_pysep_stats_calculator.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/detection/_source_catalog.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/detection/daophot.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/detection/pysep.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/detection/simpledisk.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/detection/sourcedetection.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/exptime/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/exptime/exptime.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/exptime/star.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/addfitsheaders.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/download.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/flip.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/grayscale.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/httpserver.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/normalize.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/save.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/saveimage.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/smooth.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/image/softbin.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/misc/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/misc/addmask.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/misc/catalogcircularmask.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/misc/circularmask.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/misc/createfilename.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/misc/imagesourcefilter.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/misc/removebackground.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/modules/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/modules/getfitsheaders.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/astrometry.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/brighteststar.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/brighteststar_guiding.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/dummyoffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/dummyskyoffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/fitsheader.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/offsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/pixeloffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/projected.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/offsets/spilled_light.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/photometry/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/photometry/_photometry_calculator.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/photometry/_photutil_aperture_photometry.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/photometry/_sep_aperture_photometry.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/photometry/aperture_photometry.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/photometry/photometry.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/photometry/photutil.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/photometry/pysep.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/stack/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/stack/combinestack.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/stack/mean.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/stack/median.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/stack/sigmaclip.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/stack/sum.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/wcs/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/images/processors/wcs/solarhelioprojective.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IAbortable.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IAcquisition.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IAutoFocus.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IAutoGuiding.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IAutonomous.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IBinning.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/ICalibrate.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/ICamera.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IConfig.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/ICooling.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IData.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IDataPipeline.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IDataSequence.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IDataStack.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IDome.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IExposure.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IExposureTime.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IFilters.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IFitsHeaderAfter.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IFitsHeaderBefore.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IFlatField.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IFocusModel.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IFocuser.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IGain.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IImageFormat.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IImageType.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IMode.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IModule.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IMotion.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IMultiFiber.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IOffsetsAltAz.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IOffsetsRaDec.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IPointingAltAz.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IPointingBody.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IPointingHeliocentricPolar.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IPointingHeliographicStonyhurst.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IPointingHelioprojective.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IPointingOrbitalElements.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IPointingRaDec.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IPointingSeries.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IPushNotifications.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IReady.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IResettable.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IRobotic.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IRoboticScheduler.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IRoof.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IRotation.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IRunnable.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IRunning.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IScriptRunner.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/ISpectrograph.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IStartStop.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IStructuredConfig.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/ISyncTarget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/ITelescope.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/ITemperatures.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/ITrackingMode.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/ITrackingRate.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IVideo.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IWeather.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/IWindow.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/interfaces/interface.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/camerasettings.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/datapipeline.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/datasequence.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/fitsheader.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/fitsnamespace.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/follow.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/motionstatus.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/pipeline.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/waitformotion.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/mixins/weatheraware.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/adaptive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/basecamera.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/basedata.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/basespectrograph.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/basevideo.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/dummycamera.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/dummyspectrograph.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/dummyvideo.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/pipelinecamera.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/camera/videoframes.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/flatfield/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/flatfield/flatfield.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/flatfield/pointing.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/flatfield/scheduler.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/focus/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/focus/dummyautofocus.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/focus/focusmodel.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/focus/focusseries.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/image/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/image/imagewatcher.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/image/imagewriter.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/image/pipeline.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/image/seeing.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/module.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/_base.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/_baseguiding.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/acquisition.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/autoguiding.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/dummyacquisition.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/dummyguiding.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/guidingsource.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/guidingstatistics/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/guidingstatistics/guidingstatistics.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/guidingstatistics/pixeloffset.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/guidingstatistics/skyoffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/guidingstatistics/uptime.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/pointing/scienceframeguiding.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/robotic/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/robotic/dummymastermind.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/robotic/dummyscheduler.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/robotic/mastermind.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/robotic/pointing.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/robotic/scheduler.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/robotic/scriptrunner.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/roof/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/roof/basedome.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/roof/baseroof.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/roof/dummyroof.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/telescope/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/telescope/_dummytelescopebase.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/telescope/basetelescope.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/telescope/dummyaltaztelescope.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/telescope/dummyradectelescope.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/telescope/dummysolartelescope.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/test/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/test/standalone.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/dummymode.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/dummystructuredconfig.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/fluentlogger.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/httpfilecache.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/kiosk.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/matrix.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/pushnotifier.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/stellarium.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/telegram.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/utils/trigger.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/weather/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/weather/mockweather.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/weather/weather.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/weather/weather_api.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/modules/weather/weather_state.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/object.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/py.typed +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/instruments.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/observation.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/_executor.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/astroplanscheduler.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/constraints/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/constraints/airmassconstraint.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/constraints/constraint.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/constraints/moonilluminationconstraint.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/constraints/moonseparationconstraint.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/constraints/solarelevationconstraint.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/constraints/timeconstraint.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/constraints/timeofdayconstraint.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/dataprovider.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/aftertime.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/beforetime.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/constant.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/follow.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/interval.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/merit.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/pernight.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/random.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/timewindow.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/merits/transit.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/observationarchiveevolution.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/observingperiod.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/ondemandscheduler.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/targets/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/targets/dynamictarget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/targets/heliocentricpolartarget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/targets/helioprojectivetarget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/targets/picker/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/targets/picker/csvpicker.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/targets/picker/picker.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/targets/siderealtarget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/targets/target.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scheduler/taskscheduler.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/calibration/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/calibration/darkbias.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/calibration/pointing.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/calibration/skyflats.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/control/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/control/cases.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/control/conditional.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/control/parallel.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/control/selector.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/control/sequential.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/exceptions.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/imaging/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/imaging/autofocus.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/imaging/imaging.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/imaging/transitimaging.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/script.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/utils/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/utils/callmodule.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/utils/debugtrigger.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/scripts/utils/log.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/filesystem/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/filesystem/observationarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/filesystem/taskarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/_portal.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/_schedulereader.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/_schedulewriter.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/configdb.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/mockobservationarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/observationarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/scripts/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/scripts/autofocus.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/scripts/default.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/scripts/script.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/task.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/taskarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/lco/taskrunner.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/memory/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/memory/observationarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/memory/taskarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/observationarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/portal/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/portal/observationarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/portal/taskarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/storage/taskarchive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/task.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/taskrunner.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/archive/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/archive/archive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/archive/local_archive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/archive/pyobs_archive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/calibration.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/exptime/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/exptime/exptime.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/exptime/stellarexptime.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/exptimeeval.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/flatfielder.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/pointing/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/pointing/base.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/pointing/static.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/priorities/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/priorities/archive.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/priorities/base.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/priorities/const.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/robotic/utils/skyflats/scheduler.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/average.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/cache.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/config.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/config_schema.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/coolingramp.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/coordinates.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/curvefit.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/enums.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/exceptions.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/exptime_grouping.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/fits.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/focusseries/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/focusseries/base.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/focusseries/photometry.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/focusseries/projection.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/frameheader.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/grids/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/grids/filters.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/grids/grid.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/grids/gridnode.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/grids/pipeline.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/binningwidget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/coolingwidget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/datadisplaywidget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/exposewidget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/exposuretimewidget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/gainoffsetwidget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/imageformatwidget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/listpickerdialog.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/gui/camera/windowingwidget.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/http.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/influxdb.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/logger.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/logging/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/logging/context.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/logging/resolvableerror.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/modulegui.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/offsets/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/offsets/applyaltazoffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/offsets/applyoffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/offsets/applyradecoffsets.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/parallel.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/pipeline/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/pipeline/pipeline.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/pipeline/progress.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/pipeline/reduction.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/pipeline/reduction_base.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/publisher/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/publisher/csv.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/publisher/http.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/publisher/log.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/publisher/multi.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/publisher/publisher.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/serialization.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/shellcommand.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/stretch.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/threads/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/threads/lockwithabort.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/time.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/units.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/utils/versions.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/version.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/archivefile.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/bufferedfile.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/file.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/filelists/__init__.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/filelists/filelist.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/filelists/testing.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/httpfile.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/localfile.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/memfile.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/sftpfile.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/smbfile.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/sshfile.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/tempfile.py +0 -0
- {pyobs_core-2.28.3 → pyobs_core-2.29.0.dev2}/pyobs/vfs/vfs.py +0 -0
|
@@ -14,6 +14,7 @@ import yaml
|
|
|
14
14
|
from pyobs.comm.dummy import DummyComm
|
|
15
15
|
from pyobs.modules import Module, MultiModule
|
|
16
16
|
from pyobs.object import get_class_from_string, get_object
|
|
17
|
+
from pyobs.utils import shutdown
|
|
17
18
|
from pyobs.utils.config import pre_process_yaml
|
|
18
19
|
from pyobs.utils.logging.context import ModuleNameFilter
|
|
19
20
|
from pyobs.utils.versions import loaded_pyobs_packages
|
|
@@ -111,6 +112,8 @@ class Application:
|
|
|
111
112
|
syslog: bool = False,
|
|
112
113
|
influx_log: InfluxLogConfig | None = None,
|
|
113
114
|
iers_offline: bool = False,
|
|
115
|
+
pid_file: str | None = None,
|
|
116
|
+
stop_timeout: float = 30.0,
|
|
114
117
|
**kwargs: Any,
|
|
115
118
|
):
|
|
116
119
|
"""Initializes a pyobs application.
|
|
@@ -137,7 +140,20 @@ class Application:
|
|
|
137
140
|
(pyobs.cli.pyobs's GLOBAL_CONFIG_KEYS) instead of a bare env var, so it applies
|
|
138
141
|
the same way regardless of how the module process was spawned.
|
|
139
142
|
influx_log: Log to influx DB.
|
|
143
|
+
pid_file: PID file of a daemonized module, if any. A module that needs more time to shut
|
|
144
|
+
down then writes its deadline into a stop file next to it (see pyobs.utils.shutdown),
|
|
145
|
+
which pyobsd and web-admin respect before sending SIGKILL.
|
|
146
|
+
stop_timeout: Seconds the shutdown may take after the first signal, unless the module asks for more
|
|
147
|
+
time (see pyobs.utils.shutdown). After that, plus a short grace time, the process ends itself.
|
|
148
|
+
pyobsd passes its own stop_timeout here.
|
|
140
149
|
"""
|
|
150
|
+
self._stop_timeout = float(stop_timeout)
|
|
151
|
+
self._stopping = False
|
|
152
|
+
# stop file for extend_stop_timeout(), removed again at the end of run(); one left behind by an earlier
|
|
153
|
+
# run (e.g. killed during shutdown) would make this run look like it is stopping
|
|
154
|
+
shutdown.set_stop_file(shutdown.stop_file_for(pid_file) if pid_file is not None else None)
|
|
155
|
+
shutdown.clear_stop_file()
|
|
156
|
+
|
|
141
157
|
if (config is None) == (module_factory is None):
|
|
142
158
|
raise ValueError("Exactly one of 'config' or 'module_factory' must be given.")
|
|
143
159
|
if module_factory is not None and loop_module_class is None:
|
|
@@ -355,9 +371,25 @@ class Application:
|
|
|
355
371
|
log.info("Closing loop...")
|
|
356
372
|
self._loop.close()
|
|
357
373
|
|
|
374
|
+
# shutdown is done, so a deadline from extend_stop_timeout() no longer applies
|
|
375
|
+
shutdown.clear_stop_file()
|
|
376
|
+
|
|
358
377
|
def _signal_handler(self, sig: int) -> None:
|
|
359
378
|
"""React to signals and quit the module."""
|
|
360
379
|
|
|
380
|
+
# only the first signal starts the shutdown. The handlers stay installed, since removing them would
|
|
381
|
+
# restore the default action, and a second SIGTERM (e.g. "pyobsd stop" run again) would then kill the
|
|
382
|
+
# module in the middle of its shutdown (e.g. while a camera warms up)
|
|
383
|
+
if self._stopping:
|
|
384
|
+
log.info("Got signal: %s, already shutting down.", sig)
|
|
385
|
+
return
|
|
386
|
+
self._stopping = True
|
|
387
|
+
|
|
388
|
+
# let pyobsd/web-admin show the module as "stopping" until it is gone, and end the process if that
|
|
389
|
+
# takes too long, also when nobody waits to send SIGKILL
|
|
390
|
+
shutdown.mark_stopping()
|
|
391
|
+
shutdown.start_watchdog(self._stop_timeout)
|
|
392
|
+
|
|
361
393
|
if self._module is not None:
|
|
362
394
|
self._module.quit()
|
|
363
395
|
else:
|
|
@@ -367,11 +399,7 @@ class Application:
|
|
|
367
399
|
self._main_task.cancel()
|
|
368
400
|
self._loop.stop()
|
|
369
401
|
|
|
370
|
-
# reset signal handlers
|
|
371
402
|
log.info("Got signal: %s, shutting down.", sig)
|
|
372
|
-
loop = asyncio.get_running_loop()
|
|
373
|
-
loop.remove_signal_handler(signal.SIGTERM)
|
|
374
|
-
loop.add_signal_handler(signal.SIGINT, lambda: None)
|
|
375
403
|
|
|
376
404
|
async def _main(self) -> None:
|
|
377
405
|
"""Actually run the application."""
|
|
@@ -24,6 +24,7 @@ class PyobsCLI(CLI):
|
|
|
24
24
|
"influx_log",
|
|
25
25
|
"debug_time",
|
|
26
26
|
"iers_offline",
|
|
27
|
+
"stop_timeout",
|
|
27
28
|
]
|
|
28
29
|
|
|
29
30
|
def init_cli(self) -> None:
|
|
@@ -63,6 +64,15 @@ class PyobsCLI(CLI):
|
|
|
63
64
|
default=self._config.get("iers_offline", False),
|
|
64
65
|
)
|
|
65
66
|
|
|
67
|
+
# shutdown
|
|
68
|
+
self._parser.add_argument(
|
|
69
|
+
"--stop-timeout",
|
|
70
|
+
type=float,
|
|
71
|
+
default=self._config.get("stop_timeout", 30.0),
|
|
72
|
+
metavar="SECONDS",
|
|
73
|
+
help="seconds the shutdown may take before the module ends itself, unless it asked for more time",
|
|
74
|
+
)
|
|
75
|
+
|
|
66
76
|
# debug stuff
|
|
67
77
|
self._parser.add_argument(
|
|
68
78
|
"--debug-time",
|
|
@@ -112,6 +122,9 @@ class PyobsCLI(CLI):
|
|
|
112
122
|
import daemon
|
|
113
123
|
from daemon import pidfile
|
|
114
124
|
|
|
125
|
+
# absolute, since DaemonContext changes into the run directory before the application gets the path
|
|
126
|
+
pid_file = os.path.abspath(pid_file)
|
|
127
|
+
|
|
115
128
|
# get run directory
|
|
116
129
|
run_dir = os.path.dirname(pid_file)
|
|
117
130
|
|
|
@@ -119,7 +132,7 @@ class PyobsCLI(CLI):
|
|
|
119
132
|
with daemon.DaemonContext(
|
|
120
133
|
working_directory=run_dir, umask=0o002, pidfile=pidfile.TimeoutPIDLockFile(pid_file)
|
|
121
134
|
) as _:
|
|
122
|
-
self.application(**self._config).run()
|
|
135
|
+
self.application(**{**self._config, "pid_file": pid_file}).run()
|
|
123
136
|
|
|
124
137
|
|
|
125
138
|
def main() -> None:
|
|
@@ -14,6 +14,8 @@ from typing import Any
|
|
|
14
14
|
|
|
15
15
|
import psutil
|
|
16
16
|
|
|
17
|
+
from pyobs.utils.shutdown import read_stop_deadline, stop_file_for
|
|
18
|
+
|
|
17
19
|
from ._cli import CLI
|
|
18
20
|
|
|
19
21
|
log = logging.getLogger("pyobs")
|
|
@@ -35,6 +37,7 @@ class PyobsDaemonCLI(CLI):
|
|
|
35
37
|
"syslog",
|
|
36
38
|
"file_log",
|
|
37
39
|
"chuid",
|
|
40
|
+
"stop_timeout",
|
|
38
41
|
]
|
|
39
42
|
|
|
40
43
|
def init_cli(self) -> None:
|
|
@@ -62,12 +65,23 @@ class PyobsDaemonCLI(CLI):
|
|
|
62
65
|
default=self._config.get("file_log", False),
|
|
63
66
|
)
|
|
64
67
|
self._parser.add_argument("--chuid", type=str, default=self._config.get("chuid", "pyobs:pyobs"))
|
|
68
|
+
self._parser.add_argument(
|
|
69
|
+
"--stop-timeout",
|
|
70
|
+
type=float,
|
|
71
|
+
default=self._config.get("stop_timeout", 30.0),
|
|
72
|
+
metavar="SECONDS",
|
|
73
|
+
help="seconds to wait after SIGTERM before sending SIGKILL, unless the module asked for more time",
|
|
74
|
+
)
|
|
65
75
|
self._parser.add_argument("-v", "--verbose", action="store_true")
|
|
66
76
|
|
|
67
77
|
# commands
|
|
68
78
|
sp = self._parser.add_subparsers(dest="command")
|
|
69
79
|
sp.add_parser("start", help="start modules").add_argument("modules", type=str, nargs="*")
|
|
70
|
-
sp.add_parser("stop", help="stop modules")
|
|
80
|
+
stop_parser = sp.add_parser("stop", help="stop modules")
|
|
81
|
+
stop_parser.add_argument("modules", type=str, nargs="*")
|
|
82
|
+
stop_parser.add_argument(
|
|
83
|
+
"--no-wait", action="store_true", help="only send SIGTERM, do not wait for the modules to exit"
|
|
84
|
+
)
|
|
71
85
|
sp.add_parser("restart", help="restart modules").add_argument("modules", type=str, nargs="*")
|
|
72
86
|
status_parser = sp.add_parser("status", help="status of modules")
|
|
73
87
|
status_parser.add_argument("--json", action="store_true")
|
|
@@ -94,6 +108,7 @@ class PyobsDaemonCLI(CLI):
|
|
|
94
108
|
syslog=self._config["syslog"],
|
|
95
109
|
file_log=self._config["file_log"],
|
|
96
110
|
chuid=self._config["chuid"],
|
|
111
|
+
stop_timeout=self._config["stop_timeout"],
|
|
97
112
|
verbose=self._config["verbose"],
|
|
98
113
|
)
|
|
99
114
|
|
|
@@ -102,7 +117,7 @@ class PyobsDaemonCLI(CLI):
|
|
|
102
117
|
case "start":
|
|
103
118
|
daemon.start(modules=self._config["modules"])
|
|
104
119
|
case "stop":
|
|
105
|
-
daemon.stop(modules=self._config["modules"])
|
|
120
|
+
daemon.stop(modules=self._config["modules"], wait=not self._config["no_wait"])
|
|
106
121
|
case "restart":
|
|
107
122
|
daemon.restart(modules=self._config["modules"])
|
|
108
123
|
case "status":
|
|
@@ -123,10 +138,12 @@ class PyobsDaemon:
|
|
|
123
138
|
syslog: bool = False,
|
|
124
139
|
file_log: bool = False,
|
|
125
140
|
chuid: str | None = None,
|
|
141
|
+
stop_timeout: float = 30.0,
|
|
126
142
|
verbose: bool = False,
|
|
127
143
|
**kwargs: Any,
|
|
128
144
|
):
|
|
129
145
|
self._config_path = config_path
|
|
146
|
+
self._stop_timeout = stop_timeout
|
|
130
147
|
self._run_path = run_path
|
|
131
148
|
self._log_path = log_path
|
|
132
149
|
self._log_level = log_level
|
|
@@ -185,6 +202,10 @@ class PyobsDaemon:
|
|
|
185
202
|
def _log_file(self, module: str) -> str:
|
|
186
203
|
return os.path.join(self._log_path, self._strip_disabled(module) + ".log")
|
|
187
204
|
|
|
205
|
+
def _stop_file(self, module: str) -> str:
|
|
206
|
+
"""Where a stopping module writes its shutdown deadline (see pyobs.utils.shutdown)."""
|
|
207
|
+
return stop_file_for(self._pid_file(module))
|
|
208
|
+
|
|
188
209
|
def _list_configs(self) -> list[str]:
|
|
189
210
|
"""Return sorted module names from *.yaml files, excluding *.shared.yaml."""
|
|
190
211
|
paths = sorted(glob.glob(os.path.join(self._config_path, "*.yaml")))
|
|
@@ -215,13 +236,14 @@ class PyobsDaemon:
|
|
|
215
236
|
return None
|
|
216
237
|
if self._is_alive(pid):
|
|
217
238
|
return pid
|
|
218
|
-
# stale PID file — remove it
|
|
219
|
-
|
|
220
|
-
os.remove(self._pid_file(module))
|
|
221
|
-
except OSError:
|
|
222
|
-
pass
|
|
239
|
+
# stale PID file — remove it, together with a stop file the process may have left behind
|
|
240
|
+
self._remove_run_files(module)
|
|
223
241
|
return None
|
|
224
242
|
|
|
243
|
+
def _stop_deadline(self, module: str) -> float | None:
|
|
244
|
+
"""The deadline a running module wrote into its stop file, or None if it is not stopping."""
|
|
245
|
+
return read_stop_deadline(self._stop_file(module))
|
|
246
|
+
|
|
225
247
|
def _process_info(self, pid: int) -> dict[str, Any]:
|
|
226
248
|
"""Return uptime (seconds) and rss_mb for a running PID. No CPU -- that needs a
|
|
227
249
|
shared sampling window across all processes, see _sample_cpu_percent."""
|
|
@@ -288,14 +310,36 @@ class PyobsDaemon:
|
|
|
288
310
|
print(f"Starting {module}...")
|
|
289
311
|
self._start_service(module)
|
|
290
312
|
|
|
291
|
-
def stop(self, modules: list[str] | None = None) -> None:
|
|
313
|
+
def stop(self, modules: list[str] | None = None, wait: bool = True) -> None:
|
|
292
314
|
# if no modules given, stop all that have a live PID
|
|
293
315
|
if not modules:
|
|
294
316
|
modules = [m for m in self._list_configs() if self._running_pid(m) is not None]
|
|
295
317
|
|
|
318
|
+
# send SIGTERM to all first, then wait for all together, so that one module with a long shutdown
|
|
319
|
+
# (e.g. a camera warming up) does not delay sending SIGTERM to the others
|
|
320
|
+
stopping: dict[str, int] = {}
|
|
296
321
|
for module in modules:
|
|
297
322
|
print(f"Stopping {module}...")
|
|
298
|
-
self.
|
|
323
|
+
pid = self._signal_stop(module)
|
|
324
|
+
if pid is not None:
|
|
325
|
+
stopping[module] = pid
|
|
326
|
+
|
|
327
|
+
if wait:
|
|
328
|
+
try:
|
|
329
|
+
self._wait_stopped(stopping)
|
|
330
|
+
except KeyboardInterrupt:
|
|
331
|
+
# the modules run in their own session and keep shutting down without us
|
|
332
|
+
print("\nStopped waiting.")
|
|
333
|
+
now = time.time()
|
|
334
|
+
for module, pid in stopping.items():
|
|
335
|
+
if not self._is_alive(pid):
|
|
336
|
+
continue
|
|
337
|
+
deadline = read_stop_deadline(self._stop_file(module))
|
|
338
|
+
until = ""
|
|
339
|
+
if deadline is not None and deadline > now:
|
|
340
|
+
until = f" (up to {self._fmt_wait(deadline - now)})"
|
|
341
|
+
print(f'{module} keeps shutting down in the background{until}, see "pyobsd status".')
|
|
342
|
+
sys.exit(130)
|
|
299
343
|
|
|
300
344
|
def restart(self, modules: list[str] | None = None) -> None:
|
|
301
345
|
self.stop(modules=modules)
|
|
@@ -319,15 +363,29 @@ class PyobsDaemon:
|
|
|
319
363
|
# it slow for no benefit when nobody's looking at CPU. Only pay for it if asked.
|
|
320
364
|
cpu_by_pid = self._sample_cpu_percent(list(pids.values()), cpu_interval) if cpu_interval else {}
|
|
321
365
|
|
|
366
|
+
# a running module with a stop file is shutting down (see pyobs.utils.shutdown)
|
|
367
|
+
deadlines = {module: self._stop_deadline(module) for module in pids}
|
|
368
|
+
now = time.time()
|
|
369
|
+
|
|
322
370
|
if print_json:
|
|
371
|
+
# "running" stays true while a module is stopping (its process is still alive), so consumers that only
|
|
372
|
+
# know "running" keep working; "state" tells them apart
|
|
323
373
|
result: dict[str, Any] = {}
|
|
324
374
|
for module in modules:
|
|
325
375
|
pid = pids.get(module)
|
|
326
376
|
if pid is not None:
|
|
327
377
|
info = self._process_info(pid)
|
|
328
|
-
|
|
378
|
+
deadline = deadlines[module]
|
|
379
|
+
result[module] = {
|
|
380
|
+
"running": True,
|
|
381
|
+
"state": "stopping" if deadline is not None else "running",
|
|
382
|
+
"stop_deadline": deadline,
|
|
383
|
+
"pid": pid,
|
|
384
|
+
"cpu": cpu_by_pid.get(pid),
|
|
385
|
+
**info,
|
|
386
|
+
}
|
|
329
387
|
else:
|
|
330
|
-
result[module] = {"running": False}
|
|
388
|
+
result[module] = {"running": False, "state": "stopped"}
|
|
331
389
|
print(json.dumps(result))
|
|
332
390
|
else:
|
|
333
391
|
# header
|
|
@@ -339,11 +397,17 @@ class PyobsDaemon:
|
|
|
339
397
|
info = self._process_info(pid)
|
|
340
398
|
cpu = cpu_by_pid.get(pid)
|
|
341
399
|
cpu_str = f"{cpu:>5.1f}%" if cpu is not None else f"{'-':>6}"
|
|
400
|
+
deadline = deadlines[module]
|
|
401
|
+
state = "stopping" if deadline is not None else "running"
|
|
402
|
+
wait = (
|
|
403
|
+
f" (up to {self._fmt_wait(deadline - now)})" if deadline is not None and deadline > now else ""
|
|
404
|
+
)
|
|
342
405
|
print(
|
|
343
|
-
f"{module:<30} {
|
|
406
|
+
f"{module:<30} {state:<8} "
|
|
344
407
|
f"{self._fmt_uptime(info['uptime']):>12} "
|
|
345
408
|
f"{cpu_str} "
|
|
346
409
|
f"{info['rss_mb']:>6.1f} MB"
|
|
410
|
+
f"{wait}"
|
|
347
411
|
)
|
|
348
412
|
else:
|
|
349
413
|
print(f"{module:<30} {'stopped':<8}")
|
|
@@ -371,12 +435,21 @@ class PyobsDaemon:
|
|
|
371
435
|
def _start_service(self, module: str) -> None:
|
|
372
436
|
os.makedirs(self._run_path, exist_ok=True)
|
|
373
437
|
|
|
438
|
+
# a stop file left behind by a previous run (e.g. killed during warm-up) must not apply to this one
|
|
439
|
+
try:
|
|
440
|
+
os.remove(self._stop_file(module))
|
|
441
|
+
except FileNotFoundError:
|
|
442
|
+
pass
|
|
443
|
+
|
|
374
444
|
cmd = [
|
|
375
445
|
self._pyobs_exec,
|
|
376
446
|
"--pid-file",
|
|
377
447
|
self._pid_file(module),
|
|
378
448
|
"--log-level",
|
|
379
449
|
self._log_level,
|
|
450
|
+
# the module ends itself if its shutdown takes longer than this (or what it asked for)
|
|
451
|
+
"--stop-timeout",
|
|
452
|
+
str(self._stop_timeout),
|
|
380
453
|
self._config_file(module),
|
|
381
454
|
]
|
|
382
455
|
if self._file_log:
|
|
@@ -431,34 +504,90 @@ class PyobsDaemon:
|
|
|
431
504
|
print(f" stderr: {stderr.decode(errors='replace').strip()}") # type: ignore[attr-defined]
|
|
432
505
|
|
|
433
506
|
def _stop_service(self, module: str) -> None:
|
|
507
|
+
"""Stops a single module and waits for it."""
|
|
508
|
+
pid = self._signal_stop(module)
|
|
509
|
+
if pid is not None:
|
|
510
|
+
self._wait_stopped({module: pid})
|
|
511
|
+
|
|
512
|
+
def _signal_stop(self, module: str) -> int | None:
|
|
513
|
+
"""Sends SIGTERM to a module. Returns its PID, or None if it is not running (anymore)."""
|
|
434
514
|
pid = self._running_pid(module)
|
|
435
515
|
if pid is None:
|
|
436
516
|
print(f"{module} is not running.")
|
|
437
|
-
return
|
|
517
|
+
return None
|
|
518
|
+
|
|
519
|
+
# already shutting down (e.g. an earlier "pyobsd stop" was interrupted): don't signal again, a module with
|
|
520
|
+
# an older pyobs-core would get killed by a second SIGTERM in the middle of its shutdown
|
|
521
|
+
if os.path.exists(self._stop_file(module)):
|
|
522
|
+
print(f"{module} is already shutting down.")
|
|
523
|
+
return pid
|
|
438
524
|
|
|
439
525
|
try:
|
|
440
526
|
os.kill(pid, signal.SIGTERM)
|
|
441
527
|
except OSError:
|
|
442
|
-
return
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
528
|
+
return None
|
|
529
|
+
return pid
|
|
530
|
+
|
|
531
|
+
def _wait_stopped(self, stopping: dict[str, int]) -> None:
|
|
532
|
+
"""Waits for the given modules to exit and sends SIGKILL to those that take too long.
|
|
533
|
+
|
|
534
|
+
"Too long" is stop_timeout after SIGTERM, or later if the module wrote a later deadline into its stop
|
|
535
|
+
file (pyobs.utils.shutdown.extend_stop_timeout, e.g. while a camera warms up).
|
|
536
|
+
|
|
537
|
+
The last deadline read is kept: the application removes its stop file once its shutdown is done, but the
|
|
538
|
+
process lives on for a moment after that, and must not fall back to stop_timeout and get killed then."""
|
|
539
|
+
default_deadline = time.time() + self._stop_timeout
|
|
540
|
+
announced: dict[str, float] = {}
|
|
541
|
+
last_requested: dict[str, float] = {}
|
|
542
|
+
remaining = dict(stopping)
|
|
543
|
+
|
|
544
|
+
while remaining:
|
|
545
|
+
now = time.time()
|
|
546
|
+
for module, pid in list(remaining.items()):
|
|
547
|
+
if not self._is_alive(pid):
|
|
548
|
+
del remaining[module]
|
|
549
|
+
self._remove_run_files(module)
|
|
550
|
+
continue
|
|
551
|
+
|
|
552
|
+
requested = read_stop_deadline(self._stop_file(module))
|
|
553
|
+
if requested is not None:
|
|
554
|
+
last_requested[module] = requested
|
|
555
|
+
else:
|
|
556
|
+
requested = last_requested.get(module)
|
|
557
|
+
deadline = max(default_deadline, requested or 0.0)
|
|
558
|
+
if requested is not None and requested > default_deadline and announced.get(module) != requested:
|
|
559
|
+
announced[module] = requested
|
|
560
|
+
print(f"{module} is shutting down, waiting up to {self._fmt_wait(requested - now)}.")
|
|
561
|
+
|
|
562
|
+
if now >= deadline:
|
|
563
|
+
if self._verbose:
|
|
564
|
+
print(f"[DEBUG] {module} did not stop in time, sending SIGKILL")
|
|
565
|
+
else:
|
|
566
|
+
print(f"{module} did not stop in time, killing it.")
|
|
567
|
+
try:
|
|
568
|
+
os.kill(pid, signal.SIGKILL)
|
|
569
|
+
except OSError:
|
|
570
|
+
pass
|
|
571
|
+
del remaining[module]
|
|
572
|
+
self._remove_run_files(module)
|
|
573
|
+
|
|
574
|
+
if remaining:
|
|
575
|
+
time.sleep(0.1)
|
|
576
|
+
|
|
577
|
+
def _remove_run_files(self, module: str) -> None:
|
|
578
|
+
"""Removes PID and stop file of a module."""
|
|
579
|
+
for path in (self._pid_file(module), self._stop_file(module)):
|
|
452
580
|
try:
|
|
453
|
-
os.
|
|
581
|
+
os.remove(path)
|
|
454
582
|
except OSError:
|
|
455
583
|
pass
|
|
456
584
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
585
|
+
@staticmethod
|
|
586
|
+
def _fmt_wait(seconds: float) -> str:
|
|
587
|
+
seconds = max(0, int(seconds))
|
|
588
|
+
if seconds < 120:
|
|
589
|
+
return f"{seconds} s"
|
|
590
|
+
return f"{round(seconds / 60)} min"
|
|
462
591
|
|
|
463
592
|
|
|
464
593
|
def main() -> None:
|
|
@@ -6,6 +6,7 @@ from typing import Any
|
|
|
6
6
|
|
|
7
7
|
from pyobs.interfaces import CoolingState
|
|
8
8
|
from pyobs.utils.coolingramp import CoolingRamp
|
|
9
|
+
from pyobs.utils.shutdown import extend_stop_timeout
|
|
9
10
|
|
|
10
11
|
log = logging.getLogger(__name__)
|
|
11
12
|
|
|
@@ -16,6 +17,8 @@ _RETRY_DELAY = 5.0
|
|
|
16
17
|
_CLOSE_MARGIN_FACTOR = 1.2
|
|
17
18
|
_CLOSE_MARGIN_SECONDS = 60.0
|
|
18
19
|
_CLOSE_FALLBACK_TIMEOUT = 300.0
|
|
20
|
+
# extra time asked from pyobsd/systemd on top of the warm-up, for the rest of close()
|
|
21
|
+
_STOP_TIMEOUT_EXTRA_SECONDS = 30.0
|
|
19
22
|
|
|
20
23
|
|
|
21
24
|
class CoolingRampMixin:
|
|
@@ -143,6 +146,8 @@ class CoolingRampMixin:
|
|
|
143
146
|
timeout = self._cooling_close_timeout
|
|
144
147
|
if timeout is None:
|
|
145
148
|
timeout = await self._cooling_estimated_close_timeout()
|
|
149
|
+
# whoever stops the module (pyobsd, web-admin, systemd) must not kill it during the warm-up
|
|
150
|
+
extend_stop_timeout(timeout + _STOP_TIMEOUT_EXTRA_SECONDS)
|
|
146
151
|
self._cooling_target = (False, None)
|
|
147
152
|
try:
|
|
148
153
|
await asyncio.wait_for(self._cooling_run_to_end(), timeout)
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"""Lets a module ask whoever stops it for more time to shut down.
|
|
2
|
+
|
|
3
|
+
A module with a long shutdown (e.g. a cooled camera warming up in ``close()``) calls
|
|
4
|
+
:func:`extend_stop_timeout`. Depending on how the module was started, that
|
|
5
|
+
|
|
6
|
+
- sends ``EXTEND_TIMEOUT_USEC`` to systemd, if ``$NOTIFY_SOCKET`` is set (see ``sd_notify(3)``; systemd
|
|
7
|
+
only honors it for ``Type=notify`` services), and/or
|
|
8
|
+
- writes the deadline (wall-clock epoch seconds) into a stop file next to the PID file, if the module was
|
|
9
|
+
started with ``--pid-file`` (pyobsd's and web-admin's PID-file mode). They read it with
|
|
10
|
+
:func:`read_stop_deadline` and only send SIGKILL after that deadline.
|
|
11
|
+
|
|
12
|
+
Without either, it only moves the module's own deadline (see :func:`start_watchdog`).
|
|
13
|
+
|
|
14
|
+
On the first signal, the application also starts a watchdog thread (:func:`start_watchdog`). It ends the
|
|
15
|
+
process with ``os._exit(1)`` if the shutdown runs past the deadline, so a module whose shutdown hangs does not
|
|
16
|
+
stay "stopping" forever when nobody is waiting to send SIGKILL (``pyobsd stop --no-wait``, Ctrl+C on
|
|
17
|
+
``pyobsd stop``).
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import logging
|
|
23
|
+
import os
|
|
24
|
+
import socket
|
|
25
|
+
import threading
|
|
26
|
+
import time
|
|
27
|
+
|
|
28
|
+
log = logging.getLogger(__name__)
|
|
29
|
+
|
|
30
|
+
STOP_FILE_SUFFIX = ".stopping"
|
|
31
|
+
|
|
32
|
+
# seconds the watchdog waits past the deadline before ending the process, so that pyobsd's SIGKILL (at the
|
|
33
|
+
# deadline) usually comes first, and the module only ends itself when nobody else does
|
|
34
|
+
WATCHDOG_GRACE_SECONDS = 5.0
|
|
35
|
+
|
|
36
|
+
_stop_file: str | None = None
|
|
37
|
+
|
|
38
|
+
# the module's own deadline (epoch seconds), as last set by mark_stopping()/extend_stop_timeout()
|
|
39
|
+
_deadline: float | None = None
|
|
40
|
+
_watchdog: threading.Thread | None = None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def stop_file_for(pid_file: str) -> str:
|
|
44
|
+
"""Path of the stop file belonging to a PID file."""
|
|
45
|
+
return pid_file + STOP_FILE_SUFFIX
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def set_stop_file(path: str | None) -> None:
|
|
49
|
+
"""Sets the stop file that :func:`extend_stop_timeout` writes to. Called by the application."""
|
|
50
|
+
global _stop_file
|
|
51
|
+
_stop_file = path
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def mark_stopping() -> None:
|
|
55
|
+
"""Marks the module as shutting down, without asking for more time. Called by the application on SIGTERM.
|
|
56
|
+
|
|
57
|
+
In PID-file mode, the stop file is what makes pyobsd and web-admin show the module as "stopping". The deadline
|
|
58
|
+
written is "now" (or a later one that is already there), which extends nothing, since they always wait at least
|
|
59
|
+
their own stop timeout. Under systemd, sends ``STOPPING=1``. Never raises."""
|
|
60
|
+
global _deadline
|
|
61
|
+
_deadline = max(time.time(), _deadline or 0.0)
|
|
62
|
+
notify("STOPPING=1")
|
|
63
|
+
if _stop_file is not None:
|
|
64
|
+
_write_deadline(_stop_file, max(time.time(), read_stop_deadline(_stop_file) or 0.0))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def extend_stop_timeout(seconds: float) -> None:
|
|
68
|
+
"""Asks for up to ``seconds`` more time to shut down, counted from now. Never raises."""
|
|
69
|
+
global _deadline
|
|
70
|
+
_deadline = time.time() + seconds
|
|
71
|
+
notify(f"EXTEND_TIMEOUT_USEC={int(seconds * 1_000_000)}")
|
|
72
|
+
if _stop_file is not None:
|
|
73
|
+
_write_deadline(_stop_file, time.time() + seconds)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def clear_stop_file() -> None:
|
|
77
|
+
"""Removes the stop file, if any, and forgets the deadline. Called by the application at the end of its
|
|
78
|
+
shutdown."""
|
|
79
|
+
global _deadline
|
|
80
|
+
_deadline = None
|
|
81
|
+
if _stop_file is None:
|
|
82
|
+
return
|
|
83
|
+
try:
|
|
84
|
+
os.remove(_stop_file)
|
|
85
|
+
except FileNotFoundError:
|
|
86
|
+
pass
|
|
87
|
+
except OSError as e:
|
|
88
|
+
log.warning("Could not remove stop file %s: %s", _stop_file, e)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def read_stop_deadline(path: str) -> float | None:
|
|
92
|
+
"""Reads the deadline (epoch seconds) from a stop file, or None if there is no valid one."""
|
|
93
|
+
try:
|
|
94
|
+
with open(path) as f:
|
|
95
|
+
return float(f.read().strip())
|
|
96
|
+
except (OSError, ValueError):
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def current_deadline() -> float | None:
|
|
101
|
+
"""The module's own deadline (epoch seconds), as last set by :func:`mark_stopping` or
|
|
102
|
+
:func:`extend_stop_timeout`, or None."""
|
|
103
|
+
return _deadline
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def start_watchdog(stop_timeout: float, grace: float = WATCHDOG_GRACE_SECONDS, interval: float = 1.0) -> None:
|
|
107
|
+
"""Starts a daemon thread that ends the process if its shutdown takes too long. Called by the application
|
|
108
|
+
on the first signal; calling it again does nothing.
|
|
109
|
+
|
|
110
|
+
"Too long" is the same as for pyobsd: ``stop_timeout`` after now, or later if the module asked for more
|
|
111
|
+
time via :func:`extend_stop_timeout`, plus ``grace``. The thread checks the deadline every ``interval``
|
|
112
|
+
seconds, so later extensions apply. Being a daemon thread, it also covers a hang after ``run()`` returned,
|
|
113
|
+
e.g. while the interpreter waits for a blocked executor thread."""
|
|
114
|
+
global _watchdog
|
|
115
|
+
if _watchdog is not None:
|
|
116
|
+
return
|
|
117
|
+
default_deadline = time.time() + stop_timeout
|
|
118
|
+
_watchdog = threading.Thread(
|
|
119
|
+
target=_watch, args=(default_deadline, grace, interval), name="pyobs-shutdown-watchdog", daemon=True
|
|
120
|
+
)
|
|
121
|
+
_watchdog.start()
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _watch(default_deadline: float, grace: float, interval: float) -> None:
|
|
125
|
+
last: float | None = None
|
|
126
|
+
while True:
|
|
127
|
+
# keep the last deadline seen, clear_stop_file() resets it at the very end of the shutdown
|
|
128
|
+
last = _deadline if _deadline is not None else last
|
|
129
|
+
deadline = max(default_deadline, last or 0.0) + grace
|
|
130
|
+
now = time.time()
|
|
131
|
+
if now >= deadline:
|
|
132
|
+
break
|
|
133
|
+
time.sleep(min(interval, deadline - now))
|
|
134
|
+
|
|
135
|
+
log.error("Shutdown did not finish in time, exiting now.")
|
|
136
|
+
clear_stop_file()
|
|
137
|
+
for handler in logging.getLogger().handlers:
|
|
138
|
+
try:
|
|
139
|
+
handler.flush()
|
|
140
|
+
except Exception:
|
|
141
|
+
pass
|
|
142
|
+
os._exit(1)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def notify(message: str) -> bool:
|
|
146
|
+
"""Sends one message to systemd's notification socket, without libsystemd.
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
True if it was sent, False if ``$NOTIFY_SOCKET`` is not set or sending failed.
|
|
150
|
+
"""
|
|
151
|
+
address = os.environ.get("NOTIFY_SOCKET")
|
|
152
|
+
if not address:
|
|
153
|
+
return False
|
|
154
|
+
if address[0] == "@":
|
|
155
|
+
# abstract namespace
|
|
156
|
+
address = "\0" + address[1:]
|
|
157
|
+
elif address[0] != "/":
|
|
158
|
+
log.warning("Unsupported NOTIFY_SOCKET %r, not notifying systemd.", address)
|
|
159
|
+
return False
|
|
160
|
+
try:
|
|
161
|
+
with socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM | socket.SOCK_CLOEXEC) as sock:
|
|
162
|
+
sock.connect(address)
|
|
163
|
+
sock.sendall(message.encode())
|
|
164
|
+
return True
|
|
165
|
+
except OSError as e:
|
|
166
|
+
log.warning("Could not notify systemd (%s): %s", message, e)
|
|
167
|
+
return False
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def _write_deadline(path: str, deadline: float) -> None:
|
|
171
|
+
tmp = f"{path}.{os.getpid()}.tmp"
|
|
172
|
+
try:
|
|
173
|
+
with open(tmp, "w") as f:
|
|
174
|
+
f.write(f"{deadline:.3f}\n")
|
|
175
|
+
os.replace(tmp, path)
|
|
176
|
+
except OSError as e:
|
|
177
|
+
log.warning("Could not write stop file %s: %s", path, e)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
__all__ = [
|
|
181
|
+
"STOP_FILE_SUFFIX",
|
|
182
|
+
"stop_file_for",
|
|
183
|
+
"set_stop_file",
|
|
184
|
+
"mark_stopping",
|
|
185
|
+
"extend_stop_timeout",
|
|
186
|
+
"clear_stop_file",
|
|
187
|
+
"read_stop_deadline",
|
|
188
|
+
"current_deadline",
|
|
189
|
+
"start_watchdog",
|
|
190
|
+
"notify",
|
|
191
|
+
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|