kafka_connector.timer

class kafka_connector.timer.Begin

Bases: enum.Enum

Variables:
  • IMMEDIATELY – 1
  • FULL_CENTISECOND – 2
  • FULL_DECISECOND – 3
  • FULL_SECOND – 4
  • FULL_MINUTE – 5
  • FULL_HOUR – 6
  • CUSTOM – 10
_member_type_

alias of object

class kafka_connector.timer.Timer(timer_function, interval=1, unit=<Unit.SECOND: 2>, begin=<Begin.FULL_SECOND: 4>)

Bases: object

__init__(timer_function, interval=1, unit=<Unit.SECOND: 2>, begin=<Begin.FULL_SECOND: 4>)
Parameters:
__weakref__

list of weak references to the object (if defined)

is_started()
Returns:If the timer has already been started
Return type:bool
is_stopped()
Returns:If timer loop finished
Return type:bool
start()

Start timer and repeat calling self.timer_function every self.interval

stop()

Sets loop condition to false and timer loop will break at the next condition check.

class kafka_connector.timer.Unit

Bases: enum.Enum

Variables:
  • MILLISECOND – 1
  • SECOND – 2
  • MINUTE – 3
  • HOUR – 4
_member_type_

alias of object