worker.components

Worker-level Bootsteps.

Module Contents

Classes

Timer() Timer bootstep.
Hub(self,w,**kwargs) Worker starts the event loop.
Pool(self,w,autoscale=None,**kwargs) Bootstep managing the worker pool.
Beat(self,w,beat=False,**kwargs) Step used to embed a beat process.
StateDB(self,w,**kwargs) Bootstep that sets up between-restart state database file.
Consumer() Bootstep starting the Consumer blueprint.
class Timer

Timer bootstep.

create(w)
on_timer_error(exc)
on_timer_tick(delay)
class Hub(w, **kwargs)

Worker starts the event loop.

__init__(w, **kwargs)
include_if(w)
create(w)
start(w)
stop(w)
terminate(w)
_patch_thread_primitives(w)
class Pool(w, autoscale=None, **kwargs)

Bootstep managing the worker pool.

Describes how to initialize the worker pool, and starts and stops the pool during worker start-up/shutdown.

Adds attributes:

  • autoscale
  • pool
  • max_concurrency
  • min_concurrency
__init__(w, autoscale=None, **kwargs)
close(w)
terminate(w)
create(w)
info(w)
register_with_event_loop(w, hub)
class Beat(w, beat=False, **kwargs)

Step used to embed a beat process.

Enabled when the beat argument is set.

__init__(w, beat=False, **kwargs)
create(w)
class StateDB(w, **kwargs)

Bootstep that sets up between-restart state database file.

__init__(w, **kwargs)
create(w)
class Consumer

Bootstep starting the Consumer blueprint.

create(w)