MCPcopy
hub / github.com/celery/celery / __init__

Method __init__

celery/events/snapshot.py:35–43  ·  view source on GitHub ↗
(self, state, freq=1.0, maxrate=None,
                 cleanup_freq=3600.0, timer=None, app=None)

Source from the content-addressed store, hash-verified

33 _ctref = None
34
35 def __init__(self, state, freq=1.0, maxrate=None,
36 cleanup_freq=3600.0, timer=None, app=None):
37 self.app = app_or_default(app)
38 self.state = state
39 self.freq = freq
40 self.cleanup_freq = cleanup_freq
41 self.timer = timer or self.timer or Timer()
42 self.logger = logger
43 self.maxrate = maxrate and TokenBucket(rate(maxrate))
44
45 def install(self):
46 self._tref = self.timer.call_repeatedly(self.freq, self.capture)

Callers

nothing calls this directly

Calls 2

TimerClass · 0.90
rateFunction · 0.90

Tested by

no test coverage detected