Skip to content

Commit

Permalink
Update disable_source to work for tasks already in the download queue. (
Browse files Browse the repository at this point in the history
  • Loading branch information
myersCody authored Jun 17, 2024
1 parent 5efed78 commit b3cc626
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions koku/masu/processor/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def get_report_files( # noqa: C901
None
"""
if is_source_disabled(provider_uuid):
return
# Existing schema will start with acct and we strip that prefix for use later
# new customers include the org prefix in case an org-id and an account number might overlap
context = {"schema": customer_name}
Expand Down Expand Up @@ -1127,6 +1129,8 @@ def remove_stale_tenants():
@celery_app.task(name="masu.processor.tasks.process_openshift_on_cloud", queue=GET_REPORT_FILES_QUEUE, bind=True)
def process_openshift_on_cloud(self, schema_name, provider_uuid, bill_date, tracing_id=None):
"""Process OpenShift on Cloud parquet files using Trino."""
if is_source_disabled(provider_uuid):
return
provider = Provider.objects.get(uuid=provider_uuid)
provider_type = provider.type.replace("-local", "")

Expand Down Expand Up @@ -1187,6 +1191,8 @@ def process_daily_openshift_on_cloud(
self, schema_name, provider_uuid, bill_date, start_date, end_date, tracing_id=None
):
"""Process daily partitioned OpenShift on Cloud parquet files using Trino."""
if is_source_disabled(provider_uuid):
return
provider = Provider.objects.get(uuid=provider_uuid)
provider_type = provider.type.replace("-local", "")

Expand Down

0 comments on commit b3cc626

Please sign in to comment.