beanlab / quest_framework

A Python framework for fault-tolerant workflows
0 stars 0 forks source link

0.2.0 - resource wrappers for workflow clients. #29

Closed byubean closed 4 months ago

byubean commented 6 months ago

See test_manager.py for an example of the client behavior this PR enables.

Rather than have clients interact with the verbose, easy-to-botch signature of record_external_event or send_event, these wrappers give the client what looks like a regular resource (e.g. a queue or an event). Less to mess up. Cleaner-looking code.

ABCambridge commented 6 months ago

@byubean I tried removing that sleep statement and that test started failing, so I removed your comment since it looks like sleep needs to stay.

kjstanding commented 6 months ago

In regards to that sleep statement in test_get_queue, I see how stream_resources could eliminate the need for it. This is a nice wrapper that makes interacting with resources a lot simpler. I think going over the changes in manager.py and specifically what the wrapper functions are doing would be nice. Maybe spend like 5 minutes during our weekly meeting

kjstanding commented 4 months ago

After looking at potentially cleaning up the tests for this change utilizing stream_resources I realized that we might have more work to do with stream_resources and being able to use it through a workflow manager context. Maybe we ought to close this PR and create new issues for 1. integrating stream_resources into manager and 2. cleaning up tests with stream_resources