New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify LoopService.loop_seconds
handling and add debug mode to speedup tests
#242
Conversation
@property | ||
def loop_seconds(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed some code in the Cloud batch writer that also implements this property which made me feel retaining the _default
suffix on loop_seconds
was the easiest way to avoid naming collisions. I'll probably rewrite those to call super().
in their default cases.
# if set, and no `loop_seconds` is provided, the service will attempt to load | ||
# `loop_seconds` from this config key | ||
loop_seconds_config_key = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is unused and is being removed for simplification
# shutdown flag for gracefully exiting the infinite loop | ||
is_running = True | ||
|
||
def __init__(self, loop_seconds: Union[float, int] = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing loop seconds to __init__
is unused and is being removed for simplification.
The tests that we care about speeding up run the services outside pytest :D
@jlowin I realized that we start services separately from tests in the integration/service test CI steps so I've switched to a different environment variable than the pytest one. |
Summary
loop_seconds
loading__init__``loop_seconds
passingloop_seconds
loop_seconds_debug
that is set during tests by defaultChecklist
This PR:
changes/
directory (if appropriate)