-
Notifications
You must be signed in to change notification settings - Fork 0
DM-36999: Complete integration test at USDF #38
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
Changes from all commits
d81072f
be1a742
d87df99
8a58099
52981ab
de3458f
f52b86b
81ff890
7e148fb
4bbce1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,19 +147,23 @@ def main(): | |
{"bootstrap.servers": kafka_cluster, "client.id": socket.gethostname()} | ||
) | ||
|
||
last_group = get_last_group(dest_bucket, instrument, date) | ||
_log.info(f"Last group {last_group}") | ||
|
||
src_bucket = s3.Bucket("rubin-pp-users") | ||
raw_pool = get_samples(src_bucket, instrument) | ||
|
||
new_group_base = last_group + random.randrange(10, 19) | ||
if raw_pool: | ||
_log.info(f"Observing real raw files from {instrument}.") | ||
upload_from_raws(producer, instrument, raw_pool, src_bucket, dest_bucket, n_groups, new_group_base) | ||
else: | ||
_log.info(f"No raw files found for {instrument}, generating dummy files instead.") | ||
upload_from_random(producer, instrument, dest_bucket, n_groups, new_group_base) | ||
try: | ||
last_group = get_last_group(dest_bucket, instrument, date) | ||
_log.info(f"Last group {last_group}") | ||
|
||
src_bucket = s3.Bucket("rubin-pp-users") | ||
raw_pool = get_samples(src_bucket, instrument) | ||
|
||
new_group_base = last_group + random.randrange(10, 19) | ||
if raw_pool: | ||
_log.info(f"Observing real raw files from {instrument}.") | ||
upload_from_raws(producer, instrument, raw_pool, src_bucket, dest_bucket, | ||
n_groups, new_group_base) | ||
else: | ||
_log.info(f"No raw files found for {instrument}, generating dummy files instead.") | ||
upload_from_random(producer, instrument, dest_bucket, n_groups, new_group_base) | ||
finally: | ||
producer.flush(30.0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see the warning but I'm not sure if it matters to flush and wait here. Don't they get sent out still? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the messages get sent, but such warnings usually mean that a class finalizer is doing cleanup that it can't be trusted to do. Also, the correctness of not flushing depends on the lower-level code not using callbacks, and there's no need for As for waiting, the delay when I tested it was too small to measure. |
||
|
||
|
||
def get_last_group(bucket, instrument, date): | ||
|
Uh oh!
There was an error while loading. Please reload this page.