woob.core.scheduler

class Scheduler[source]

Bases: IScheduler

Scheduler using Python’s threading.

schedule(interval, function, *args)[source]

Schedule an event.

Parameters:
  • interval (int) – delay before calling the function

  • function (callabale) – function to call

  • args – arguments to give to function

Returns:

an event identificator

repeat(interval, function, *args)[source]

Repeat a call to a function

Parameters:
  • interval (int) – interval between two calls

  • function (callable) – function to call

  • args – arguments to give to function

Returns:

an event identificator

cancel(ev)[source]

Cancel an event

Parameters:

ev – the event identificator

run()[source]

Run the scheduler loop

want_stop()[source]

Plan to stop the scheduler.