Merge pull request #1628 from alphagov/rc_updated_to_use_utils_statsd

Removed statsd from the api and use the statsd in the utils library.
This commit is contained in:
Richard Chapman
2018-02-07 09:07:16 +00:00
committed by GitHub
17 changed files with 18 additions and 79 deletions

View File

@@ -3,12 +3,12 @@ from datetime import (
datetime
)
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from sqlalchemy import desc
from app import db
from app.dao.dao_utils import transactional
from app.models import InboundSms
from app.statsd_decorators import statsd
@transactional

View File

@@ -2,6 +2,7 @@ import uuid
from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from sqlalchemy import func, desc, asc, cast, Date as sql_date
from app import db
@@ -12,7 +13,6 @@ from app.models import (
LETTER_TYPE
)
from app.variables import LETTER_TEST_API_FILENAME
from app.statsd_decorators import statsd
@statsd(namespace="dao")

View File

@@ -1,5 +1,6 @@
from datetime import datetime
from notifications_utils.statsd_decorators import statsd
from app import db
from app.dao.dao_utils import transactional
@@ -12,7 +13,6 @@ from app.models import (
MonthlyBilling,
NotificationHistory
)
from app.statsd_decorators import statsd
from app.utils import convert_utc_to_bst

View File

@@ -1,5 +1,6 @@
from datetime import datetime, timedelta
from notifications_utils.statsd_decorators import statsd
from sqlalchemy import Float, Integer, and_
from sqlalchemy import func, case, cast
from sqlalchemy import literal_column
@@ -17,7 +18,6 @@ from app.models import (
LetterRate,
Service
)
from app.statsd_decorators import statsd
from app.utils import get_london_month_from_utc_column

View File

@@ -13,6 +13,7 @@ from notifications_utils.recipients import (
InvalidPhoneError,
InvalidEmailError,
)
from notifications_utils.statsd_decorators import statsd
from werkzeug.datastructures import MultiDict
from sqlalchemy import (desc, func, or_, asc)
from sqlalchemy.orm import joinedload
@@ -44,7 +45,6 @@ from app.models import (
)
from app.dao.dao_utils import transactional
from app.statsd_decorators import statsd
@statsd(namespace="dao")

View File

@@ -1,6 +1,7 @@
import uuid
from datetime import date, datetime, timedelta, time
from notifications_utils.statsd_decorators import statsd
from sqlalchemy import asc, func, extract
from sqlalchemy.orm import joinedload
from flask import current_app
@@ -40,7 +41,6 @@ from app.models import (
TEMPLATE_TYPES,
LETTER_TYPE,
)
from app.statsd_decorators import statsd
from app.utils import get_london_month_from_utc_column, get_london_midnight_in_utc
DEFAULT_SERVICE_PERMISSIONS = [

View File

@@ -2,6 +2,7 @@ from datetime import datetime, timedelta
from itertools import groupby
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from sqlalchemy import func
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
@@ -17,7 +18,6 @@ from app.models import (
NOTIFICATION_STATUS_SUCCESS,
NOTIFICATION_DELIVERED,
NOTIFICATION_SENT)
from app.statsd_decorators import statsd
@transactional

View File

@@ -1,7 +1,7 @@
from notifications_utils.statsd_decorators import statsd
from sqlalchemy import or_, and_
from app import db
from app.statsd_decorators import statsd
from app.dao.dao_utils import transactional
from app.models import StatsTemplateUsageByMonth, Template