Skip to content

Commit

Permalink
move cloudwatch_logs_query class to utils folder
Browse files Browse the repository at this point in the history
  • Loading branch information
joefong-nhs committed Jun 10, 2024
1 parent 3d3f4db commit f0eb855
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lambdas/services/base/cloudwatch_logs_query_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import time

import boto3
from models.cloudwatch_logs_query import CloudwatchLogsQueryParams
from utils.audit_logging_setup import LoggingService
from utils.cloudwatch_logs_query import CloudwatchLogsQueryParams
from utils.exceptions import LogsQueryException

logger = LoggingService(__name__)
Expand Down
16 changes: 8 additions & 8 deletions lambdas/services/data_collection_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@

import polars as pl
from enums.supported_document_types import SupportedDocumentTypes
from models.cloudwatch_logs_query import (
CloudwatchLogsQueryParams,
LloydGeorgeRecordsDeleted,
LloydGeorgeRecordsDownloaded,
LloydGeorgeRecordsStored,
LloydGeorgeRecordsViewed,
UniqueActiveUserIds,
)
from models.statistics import (
ApplicationData,
OrganisationData,
Expand All @@ -23,6 +15,14 @@
from services.base.dynamo_service import DynamoDBService
from services.base.s3_service import S3Service
from utils.audit_logging_setup import LoggingService
from utils.cloudwatch_logs_query import (
CloudwatchLogsQueryParams,
LloydGeorgeRecordsDeleted,
LloydGeorgeRecordsDownloaded,
LloydGeorgeRecordsStored,
LloydGeorgeRecordsViewed,
UniqueActiveUserIds,
)
from utils.common_query_filters import UploadCompleted
from utils.utilities import flatten, get_file_key_from_s3_url

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from models.cloudwatch_logs_query import CloudwatchLogsQueryParams
from services.base.cloudwatch_logs_query_service import CloudwatchLogsQueryService
from tests.unit.conftest import WORKSPACE
from tests.unit.helpers.data.statistic.mock_logs_query_results import (
Expand All @@ -8,6 +7,7 @@
MOCK_RESPONSE_QUERY_FAILED,
MOCK_RESPONSE_QUERY_IN_PROGRESS,
)
from utils.cloudwatch_logs_query import CloudwatchLogsQueryParams
from utils.exceptions import LogsQueryException

MOCK_QUERY_ID = "mock_query_id"
Expand Down
16 changes: 8 additions & 8 deletions lambdas/tests/unit/services/test_data_collection_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@

import pytest
from freezegun import freeze_time
from models.cloudwatch_logs_query import (
CloudwatchLogsQueryParams,
LloydGeorgeRecordsDeleted,
LloydGeorgeRecordsDownloaded,
LloydGeorgeRecordsStored,
LloydGeorgeRecordsViewed,
UniqueActiveUserIds,
)
from pytest_unordered import unordered
from services.base.cloudwatch_logs_query_service import CloudwatchLogsQueryService
from services.base.dynamo_service import DynamoDBService
Expand Down Expand Up @@ -49,6 +41,14 @@
MOCK_LG_VIEWED,
MOCK_UNIQUE_ACTIVE_USER_IDS,
)
from utils.cloudwatch_logs_query import (
CloudwatchLogsQueryParams,
LloydGeorgeRecordsDeleted,
LloydGeorgeRecordsDownloaded,
LloydGeorgeRecordsStored,
LloydGeorgeRecordsViewed,
UniqueActiveUserIds,
)
from utils.common_query_filters import UploadCompleted


Expand Down
File renamed without changes.

0 comments on commit f0eb855

Please sign in to comment.