Classes#

DirectPoll Collector#

class chimpflow_lib.miners.direct_poll.DirectPoll(specification, predefined_uuid=None)[source]#

Object representing an image miner. The behavior is to start a coro task to waken every few seconds and query xchembku for eligible images. The images are processed using the chimpflow.Miner class. (This is an adapter to the chimp package.) Results are pushed to xchembku.

async activate()[source]#

Activate the object.

This implementation just starts the coro task to awaken every few seconds and query xchembku and do chimp crystal processing on what it is given.

Return type:

None

async deactivate()[source]#

Deactivate the object.

Causes the coro task to stop.

This implementation then releases resources relating to the xchembku connection.

Return type:

None

async tick()[source]#

A coro task which does periodic checking for new eligible images from xchembku.

Stops when flag has been set by other tasks.

# TODO: Use an event to awaken ticker early to handle stop requests sooner.

Return type:

None

async query_and_chimp()[source]#

Query for work from xchembku and do the chimp processing immediately.

Return type:

None