MCPcopy
hub / github.com/benoitc/gunicorn / run

Method run

gunicorn/reloader.py:40–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38
39class Reloader(ReloaderBase):
40 def run(self):
41 mtimes = {}
42 while True:
43 for filename in self.get_files():
44 try:
45 mtime = os.stat(filename).st_mtime
46 except OSError:
47 continue
48 old_time = mtimes.get(filename)
49 if old_time is None:
50 mtimes[filename] = mtime
51 continue
52 elif mtime > old_time:
53 if self._callback:
54 self._callback(filename)
55 time.sleep(self._interval)
56
57
58has_inotify = False

Callers

nothing calls this directly

Calls 2

get_filesMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected