Skip to content
shak-mar edited this page Aug 28, 2014 · 1 revision

Poller

This class is created using a repository url and some ( optional ) settings.

You can create it with:

from push_analyzer.poller import Poller
url = 'https://github.com/firecoders/push_analyzer'
# kwargs are default settings
poller = Poller ( url, work_dir = utils.home_directory + '/push_analyzer/', interval = 20 )

Member functions:

  • The loop () function continuously calls poll () from within the correct directory and sleeps for interval seconds.
  • The poll () function checks whether anything changed and if so, notifies the ref_change signal.

Member variables:

  • The ref_change Signal calls subscribers with the previous timestamp and the new timestamp whenever a ref changes.
  • The revisions dict contains timestamps mapped to the respective refs dicts.
Clone this wiki locally