Skip to content

Commit

Permalink
Update orchestrator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lcouzens authored Jun 27, 2024
1 parent 73399b1 commit 0abfa4f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions koku/masu/processor/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,20 @@ def get_billing_months(number_of_months):

def check_currently_processing(schema, provider):
result = False
LOG.info(f"\n\n MINUS \n\n")
if provider.polling_timestamp:
LOG.info(f"\n\n FIRST \n\n")
# Set processing delta wait time
process_wait_delta = datetime.now(tz=settings.UTC) - timedelta(days=settings.PROCESSING_WAIT_TIMER)
if is_customer_large(schema):
LOG.info(f"\n\n SECOND \n\n")
process_wait_delta = datetime.now(tz=settings.UTC) - timedelta(days=settings.LARGE_PROCESSING_WAIT_TIMER)

Check warning on line 80 in koku/masu/processor/orchestrator.py

View check run for this annotation

Codecov / codecov/patch

koku/masu/processor/orchestrator.py#L80

Added line #L80 was not covered by tests
# Fallback to creation timestamp if its a new provider
check_timestamp = (
provider.data_updated_timestamp if provider.data_updated_timestamp else provider.created_timestamp
)
# Check processing, if polling timestamp more recent than updated timestamp skip polling
if provider.polling_timestamp > check_timestamp:
LOG.info(f"\n\n THIRD \n\n")
result = True
# Check failed processing, if updated timestamp not updated in x days we should polling again
if process_wait_delta > check_timestamp:
LOG.info(f"\n\n FORTH \n\n")
result = False

Check warning on line 90 in koku/masu/processor/orchestrator.py

View check run for this annotation

Codecov / codecov/patch

koku/masu/processor/orchestrator.py#L90

Added line #L90 was not covered by tests
return result

Expand Down

0 comments on commit 0abfa4f

Please sign in to comment.