Classes#
DirectPoll Collector#
- class rockingester_lib.collectors.direct_poll.DirectPoll(specification, predefined_uuid=None)[source]#
Object representing an image collector. The behavior is to start a coro task to waken every few seconds and scan for newly created plate directories. Image files are pushed to xchembku. Plates for the image files are also pushed to xchembku the first time they are wanted.
- async activate()[source]#
Activate the object.
Then it starts the coro task to awaken every few seconds to scrape the directories.
- Return type:
- async deactivate()[source]#
Deactivate the object.
Causes the coro task to stop.
This implementation then releases resources relating to the xchembku connection.
- Return type:
- async tick()[source]#
A coro task which does periodic checking for new files in the directories.
Stops when flag has been set by other tasks.
# TODO: Use an event to awaken ticker early to handle stop requests sooner.
- Return type:
- async scrape_plates_directories()[source]#
Scrape all the configured directories looking in each one for new plate directories.
Normally there is only one in the configured list of these places where plates arrive.
- Return type:
- async scrape_plates_directory(plates_directory)[source]#
Scrape a single directory looking for subdirectories which correspond to plates.
- async scrape_plate_directory(plate_directory)[source]#
Scrape a single directory looking for images.
- async scrape_plate_directory_if_complete(plate_directory, crystal_plate_model, visit_directory)[source]#
Scrape a single directory looking for new files.
Adds discovered files to internal list which gets pushed when it reaches a configurable size.
TODO: Consider some other flow where well images can be copied as they arrive instead of doing them all in a bunch.