Energenie EG-PMS Manuel d'utilisateur Page 19

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 30
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 18
pickups Documentation, Release 0.7.0
turn_on_running()
Turn on a thing whenever a build is running. One could turn off all other lamps while a build is running.
turn_off_running()
Turn off a thing whenever no build is currently running. After turning off the indicator for running builds
one could turn on either turn_on_success() or turn_on_failure().
get_status()
Return the overall status of a extreme feedback device.
Module contents This module contains all necessary functionality to implement new feedback device classes
Submodules
basepickup
class pickups.basepickup.BasePickup(configfile)
Bases: object
BasePickup is an abstract metaclass defining behaviours for specialized pickup classes. A child class inherits
from BasePickup and implements the defined methods to work as an interface between a buildserver (Bamboo,
Jenkins, ...) and the pickups package.
Child classes should delegate the reading in of a config file to BasePickup using super. A config file is mandatory
and usually contains at least an IP address pointing to the buildserver.
Parameters configfile – A config file in the stile of key = value.
Raises IOError if no config file is given.
cleanup()
Cleanup method, used by :func:pickups.helpers.register. Usually one would turn off feedback devices etc.
here in case a interruption occurs.
update_data()
Receives updated data from the buildserver. The received data should contain information on build-
statuses. Often one can use a REST-API, provided by the buildserver to receive this data.
update_status()
Updates feedback devices according to data received from the buildserver. Common implementations
dictate to use three devices (for example coloured lamps). Common logic is to update the devices as
follows:
•Build is running: yellow light is flashing.
•Build is successful: green light is illuminated.
•Build is not successful: red light is illuminated.
helpers
pickups.helpers.register(cls, configfile, sign=15)
Register is a helper function to ease the process of registering a custom signal handler to handle signals like
SIGTERM or other. Possible Signals are defined in signal as constants.
Parameters
cls – The class to register.
3.4. Reference 15
Vue de la page 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 ... 29 30

Commentaires sur ces manuels

Pas de commentaire