ewoksjob.events.readers.redis.RedisEwoksEventReader#

class ewoksjob.events.readers.redis.RedisEwoksEventReader(url, **_)[source]#

Bases: EwoksEventReader

Parameters:

url (str)

close()#
static dereference_data_uris(event)#
Parameters:

event (Dict[str, str])

Return type:

None

static event_passes_filter(event, starttime=None, endtime=None)#
Parameters:
  • event (Dict[str, str])

  • starttime (Optional[datetime])

  • endtime (Optional[datetime])

Return type:

bool

get_events(job_id=None, **filters)[source]#

Returns all currently available events matching the filter.

Return type:

Iterable[Dict[str, str]]

get_events_with_variables(*args, **kwargs)#

get_events with URI dereferencing.

Return type:

Iterable[Dict[str, str]]

get_full_job_events(**filters)#

Returns events grouped by “job_id”. When one event matches the filter, all events with the “job_id” are returned.

Return type:

Iterable[Tuple[Dict[str, str]]]

get_full_job_events_with_variables(**filters)#

get_full_job_events with URI dereferencing.

Return type:

Iterable[Tuple[Dict[str, str]]]

poll_events(timeout=None, stop_event=None, interval=0.1, **filters)#

Yield events matching the filter until timeout is reached.

Parameters:

stop_event (Optional[Event])

Return type:

Iterable[Dict[str, str]]

poll_events_with_variables(*args, **kwargs)#

get_events with URI dereferencing.

Return type:

Iterable[Dict[str, str]]

static split_filter(starttime=None, endtime=None, **is_equal_filter)#

Splits the filter

to be applied on the list of events fetched from the database

Parameters:
  • starttime (Optional[datetime])

  • endtime (Optional[datetime])

Return type:

Tuple[dict, dict]

wait_events(**kwargs)[source]#

Yield events matching the filter until timeout is reached.

Return type:

Iterable[Dict[str, str]]

wait_events_with_variables(*args, **kwargs)#

get_events with URI dereferencing.

Return type:

Iterable[Dict[str, str]]