This commit is contained in:
Leo Hemsted
2019-11-11 16:07:18 +00:00
parent 28da190a1c
commit e29546cb65
3 changed files with 1 additions and 9 deletions

View File

@@ -530,8 +530,6 @@ def is_delivery_slow_for_providers(
ProviderDetails.identifier,
"slow"
)
print(slow_notification_counts)
print([x for x in slow_notification_counts])
slow_providers = {}
for provider, rows in groupby(slow_notification_counts, key=attrgetter('identifier')):

View File

@@ -4,11 +4,6 @@ from notifications_utils.timezones import convert_utc_to_bst
from sqlalchemy import asc, desc, func
from app.dao.dao_utils import transactional
from app.provider_details.switch_providers import (
provider_is_inactive,
provider_is_primary,
switch_providers
)
from app.models import FactBilling, ProviderDetails, ProviderDetailsHistory, SMS_TYPE, User
from app import db
@@ -52,6 +47,7 @@ def dao_reduce_sms_provider_priority(identifier):
providers[identifier].priority = max(0, providers[identifier].priority - 10)
providers[other].priority = min(100, providers[other].priority + 10)
def get_provider_details_by_notification_type(notification_type, supports_international=False):
filters = [ProviderDetails.notification_type == notification_type]

View File

@@ -5,7 +5,6 @@ import pytest
from freezegun import freeze_time
from mock import mock
from app import db
from app.celery import scheduled_tasks
from app.celery.scheduled_tasks import (
check_job_status,
@@ -13,7 +12,6 @@ from app.celery.scheduled_tasks import (
delete_verify_codes,
run_scheduled_jobs,
send_scheduled_notifications,
switch_current_sms_provider_on_slow_delivery,
replay_created_notifications,
check_precompiled_letter_state,
check_templated_letter_state,