Skip to content

Conversation

@ketaki-deodhar
Copy link
Collaborator

@ketaki-deodhar ketaki-deodhar commented Jan 9, 2026

Issue #: /bcgov/entity#31759

Description of changes:

  • Earlier implementation remains as is (specify corp identifiers in where_clause
  • Added logic to use USE_MIGRATION_FILTER, MIG_GROUP_IDS and MIG_BATCH_IDS config values

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).

@ketaki-deodhar ketaki-deodhar self-assigned this Jan 9, 2026
@ketaki-deodhar ketaki-deodhar marked this pull request as ready for review January 9, 2026 17:05
Comment on lines +165 to +173
for cnt in range(batches):
offset = cnt * batch_size
print(f'🚀 Running batch {cnt + 1}...')
batch_results = verify(
colin_engine, lear_engine, mig_corp_candidates, batch_size, offset
)
results.extend(batch_results)

print(f'🌟 Verification complete. Processed {batches} batches.')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we keep using futures like we did in the previous code. that way we leverage prefect's parallelization functionality.

looking into this more...will have more for you in a bit

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try something like this:

# Process batches concurrently (Prefect futures via .submit())
futures = []

# 1) Submit all batch tasks (non-blocking)
for cnt in range(batches):
    offset = cnt * batch_size
    print(f'🚀 Submitting batch {cnt + 1}/{batches}...')
    futures.append(
        verify.submit(
            colin_engine,
            lear_engine,
            mig_corp_candidates,
            batch_size,
            offset,
        )
    )

# 2) Resolve futures (blocking) and collect results
for f in futures:
    batch_results = f.result()
    results.extend(batch_results)

print(f'🌟 Verification complete. Processed {batches} batches.')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants