From ae48fd3bdf98863560dec789e677b17b8ba72a1c Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Fri, 1 Mar 2024 21:20:09 +0100 Subject: [PATCH] Issue #112 AggregatorConfig import cleanup --- src/openeo_aggregator/backend.py | 8 +------- src/openeo_aggregator/caching.py | 2 +- src/openeo_aggregator/connection.py | 1 - src/openeo_aggregator/partitionedjobs/tracking.py | 10 ++++------ src/openeo_aggregator/partitionedjobs/zookeeper.py | 6 +----- 5 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/openeo_aggregator/backend.py b/src/openeo_aggregator/backend.py index 5c6e042..5dfcfbb 100644 --- a/src/openeo_aggregator/backend.py +++ b/src/openeo_aggregator/backend.py @@ -70,7 +70,6 @@ CONNECTION_TIMEOUT_JOB_LOGS, CONNECTION_TIMEOUT_JOB_START, CONNECTION_TIMEOUT_RESULT, - AggregatorConfig, get_backend_config, ) from openeo_aggregator.connection import ( @@ -94,19 +93,14 @@ normalize_collection_metadata, single_backend_collection_post_processing, ) -from openeo_aggregator.metadata.reporter import LoggerReporter from openeo_aggregator.partitionedjobs import PartitionedJob -from openeo_aggregator.partitionedjobs.crossbackend import ( - CrossBackendSplitter, - SubGraphId, -) +from openeo_aggregator.partitionedjobs.crossbackend import CrossBackendSplitter from openeo_aggregator.partitionedjobs.splitting import FlimsySplitter, TileGridSplitter from openeo_aggregator.partitionedjobs.tracking import ( PartitionedJobConnection, PartitionedJobTracker, ) from openeo_aggregator.utils import ( - Clock, FlatPG, PGWithMetadata, dict_merge, diff --git a/src/openeo_aggregator/caching.py b/src/openeo_aggregator/caching.py index 40dc7b1..68ccc1a 100644 --- a/src/openeo_aggregator/caching.py +++ b/src/openeo_aggregator/caching.py @@ -12,7 +12,7 @@ from kazoo.client import KazooClient from openeo.util import TimingLogger -from openeo_aggregator.config import AggregatorConfig, get_backend_config +from openeo_aggregator.config import get_backend_config from openeo_aggregator.utils import AttrStatsProxy, Clock, strip_join DEFAULT_NAMESPACE = "_default" diff --git a/src/openeo_aggregator/connection.py b/src/openeo_aggregator/connection.py index 26661b2..f2e1d6a 100644 --- a/src/openeo_aggregator/connection.py +++ b/src/openeo_aggregator/connection.py @@ -39,7 +39,6 @@ CONNECTION_TIMEOUT_DEFAULT, CONNECTION_TIMEOUT_INIT, STREAM_CHUNK_SIZE_DEFAULT, - AggregatorConfig, get_backend_config, ) from openeo_aggregator.utils import _UNSET, Clock, EventHandler diff --git a/src/openeo_aggregator/partitionedjobs/tracking.py b/src/openeo_aggregator/partitionedjobs/tracking.py index 58d8800..60fdca8 100644 --- a/src/openeo_aggregator/partitionedjobs/tracking.py +++ b/src/openeo_aggregator/partitionedjobs/tracking.py @@ -1,19 +1,17 @@ import collections import contextlib -import dataclasses -import datetime import logging import threading -from typing import Dict, List, Optional, Union +from typing import Dict, List, Optional import flask from openeo.api.logs import LogEntry from openeo.rest.job import BatchJob, ResultAsset -from openeo.util import TimingLogger, rfc3339 +from openeo.util import TimingLogger from openeo_driver.errors import JobNotFinishedException from openeo_driver.users import User -from openeo_aggregator.config import CONNECTION_TIMEOUT_JOB_START, AggregatorConfig +from openeo_aggregator.config import CONNECTION_TIMEOUT_JOB_START from openeo_aggregator.connection import MultiBackendConnection from openeo_aggregator.partitionedjobs import ( STATUS_CREATED, @@ -31,7 +29,7 @@ ) from openeo_aggregator.partitionedjobs.splitting import TileGridSplitter from openeo_aggregator.partitionedjobs.zookeeper import ZooKeeperPartitionedJobDB -from openeo_aggregator.utils import _UNSET, Clock, PGWithMetadata, timestamp_to_rfc3339 +from openeo_aggregator.utils import _UNSET, Clock, PGWithMetadata PJOB_METADATA_FIELD_RESULT_JOBS = "result_jobs" diff --git a/src/openeo_aggregator/partitionedjobs/zookeeper.py b/src/openeo_aggregator/partitionedjobs/zookeeper.py index 77c6610..7a0b73c 100644 --- a/src/openeo_aggregator/partitionedjobs/zookeeper.py +++ b/src/openeo_aggregator/partitionedjobs/zookeeper.py @@ -7,11 +7,7 @@ from kazoo.exceptions import NodeExistsError, NoNodeError from openeo_driver.errors import JobNotFoundException -from openeo_aggregator.config import ( - AggregatorConfig, - ConfigException, - get_backend_config, -) +from openeo_aggregator.config import ConfigException, get_backend_config from openeo_aggregator.partitionedjobs import ( STATUS_INSERTED, PartitionedJob,