mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 08:45:16 -05:00
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:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user