Skip to content

Commit b3cc626

Browse files
authored
Update disable_source to work for tasks already in the download queue. (#5168)
1 parent 5efed78 commit b3cc626

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

koku/masu/processor/tasks.py

+6
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ def get_report_files( # noqa: C901
216216
None
217217
218218
"""
219+
if is_source_disabled(provider_uuid):
220+
return
219221
# Existing schema will start with acct and we strip that prefix for use later
220222
# new customers include the org prefix in case an org-id and an account number might overlap
221223
context = {"schema": customer_name}
@@ -1127,6 +1129,8 @@ def remove_stale_tenants():
11271129
@celery_app.task(name="masu.processor.tasks.process_openshift_on_cloud", queue=GET_REPORT_FILES_QUEUE, bind=True)
11281130
def process_openshift_on_cloud(self, schema_name, provider_uuid, bill_date, tracing_id=None):
11291131
"""Process OpenShift on Cloud parquet files using Trino."""
1132+
if is_source_disabled(provider_uuid):
1133+
return
11301134
provider = Provider.objects.get(uuid=provider_uuid)
11311135
provider_type = provider.type.replace("-local", "")
11321136

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

0 commit comments

Comments
 (0)