celery.worker.autoreload

celery.worker.autoreload

This module implements automatic module reloading

class celery.worker.autoreload.WorkerComponent(w, autoreload=None, \*kwargs*)[源代码]

  • conditional = True

  • create(w)[源代码]

  • label = ‘Autoreloader’

  • name = u’celery.worker.autoreload.WorkerComponent’

  • register_with_event_loop(w, hub)

  • requires = (step:celery.worker.components.Pool{(step:celery.worker.components.Queues{(step:celery.worker.components.Hub{(step:celery.worker.components.Timer{()},)},)},)},)

class celery.worker.autoreload.Autoreloader(controller, modules=None, monitor_cls=None, \*options*)[源代码]

Tracks changes in modules and fires reload commands

celery.worker.autoreload.Monitor

StatMonitor 的别名

class celery.worker.autoreload.BaseMonitor(files, on_change=None, shutdown_event=None, interval=0.5)[源代码]

class celery.worker.autoreload.StatMonitor(files, on_change=None, shutdown_event=None, interval=0.5)[源代码]

File change monitor based on the stat system call.

  • find_changes()

  • register_with_event_loop(hub)

  • start()[源代码]

class celery.worker.autoreload.KQueueMonitor(\args, **kwargs*)[源代码]

File change monitor based on BSD kernel event notifications

class celery.worker.autoreload.InotifyMonitor(modules, on_change=None, \*kwargs*)[源代码]

File change monitor based on Linux kernel inotify subsystem

  • create_notifier()

  • on_change(modified)[源代码]

  • on_event_loop_close(hub)

  • on_readable()

  • process_(event)[源代码]

  • process_IN_ATTRIB(event)

  • process_IN_MODIFY(event)

  • register_with_event_loop(hub)

  • start()[源代码]

  • stop()[源代码]

celery.worker.autoreload.file_hash(filename, algorithm=’md5’)[源代码]