mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
replace more imports, lets go all in
This commit is contained in:
@@ -53,7 +53,7 @@ from galaxy.model import (
|
||||
Job,
|
||||
User,
|
||||
)
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.model.scoped_session import galaxy_scoped_session
|
||||
from galaxy.objectstore import BaseObjectStore
|
||||
from galaxy.objectstore.caching import check_caches
|
||||
|
||||
@@ -15,7 +15,7 @@ from galaxy.model import (
|
||||
User,
|
||||
UserCredentials,
|
||||
)
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.model.scoped_session import galaxy_scoped_session
|
||||
from galaxy.schema.credentials import (
|
||||
CredentialsContextResponse,
|
||||
|
||||
@@ -47,7 +47,7 @@ from galaxy.managers.jobs import (
|
||||
from galaxy.managers.licenses import LicensesManager
|
||||
from galaxy.model import Job
|
||||
from galaxy.model.item_attrs import get_item_annotation_str
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.schema import PdfDocumentType
|
||||
from galaxy.schema.tasks import GeneratePdfDownload
|
||||
from galaxy.short_term_storage import (
|
||||
|
||||
@@ -34,7 +34,7 @@ from sqlalchemy import (
|
||||
from galaxy.managers.sse import SSEConnectionManager
|
||||
from galaxy.model import WorkerProcess
|
||||
from galaxy.model.mapping import GalaxyModelMapping
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.queues import (
|
||||
all_control_queues_for_declare,
|
||||
DEFAULT_ACTIVE_PROCESS_WINDOW_SECONDS,
|
||||
|
||||
@@ -19,7 +19,7 @@ from typing import (
|
||||
Optional,
|
||||
)
|
||||
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.web.statsd_client import VanillaGalaxyStatsdClient
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -28,7 +28,7 @@ log = logging.getLogger(__name__)
|
||||
def make_event_id() -> str:
|
||||
"""Return an SSE ``id`` string for Last-Event-ID replay.
|
||||
|
||||
Uses ``galaxy.model.orm.now`` so the timestamp format matches the rest of
|
||||
Uses ``galaxy.util.now`` so the timestamp format matches the rest of
|
||||
Galaxy's database-backed timestamps (timezone-naive UTC). Kept in one place
|
||||
so producers and the parse path cannot drift.
|
||||
"""
|
||||
|
||||
@@ -165,7 +165,7 @@ from galaxy.model.item_attrs import (
|
||||
get_item_annotation_str,
|
||||
UsesAnnotations,
|
||||
)
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.model.orm.util import add_object_to_object_session
|
||||
from galaxy.objectstore import USER_OBJECTS_SCHEME
|
||||
from galaxy.objectstore.templates import (
|
||||
|
||||
@@ -12,7 +12,7 @@ from sqlalchemy import (
|
||||
|
||||
from galaxy.model import WorkerProcess
|
||||
from galaxy.model.base import check_database_connection
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ from galaxy.model.migrations.util import (
|
||||
add_column,
|
||||
drop_column,
|
||||
)
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "186d4835587b"
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ from galaxy.model.migrations.util import (
|
||||
drop_table,
|
||||
transaction,
|
||||
)
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "570bce1e82f9"
|
||||
|
||||
@@ -30,7 +30,7 @@ from galaxy.model.custom_types import (
|
||||
MutableJSONType,
|
||||
TrimmedString,
|
||||
)
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.tool_util.toolbox.base import (
|
||||
AbstractToolBox,
|
||||
DynamicToolConfDict,
|
||||
|
||||
@@ -6,7 +6,7 @@ from typing import (
|
||||
)
|
||||
from uuid import uuid4
|
||||
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
|
||||
TEST_SOURCE_URI = "https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/2.bed"
|
||||
TEST_SOURCE_URI_SIMPLE_LINE = "https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/simple_line.txt"
|
||||
|
||||
@@ -20,7 +20,7 @@ from kombu import (
|
||||
from sqlalchemy import select
|
||||
|
||||
from galaxy.model import WorkerProcess
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from galaxy.web_stack import ApplicationStack
|
||||
|
||||
@@ -17,7 +17,7 @@ from galaxy import model
|
||||
from galaxy.exceptions import HandlerAssignmentError
|
||||
from galaxy.jobs.handler import InvocationGrabber
|
||||
from galaxy.model.base import check_database_connection
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.schema.invocation import (
|
||||
FailureReason,
|
||||
InvocationFailureDatasetFailed,
|
||||
|
||||
@@ -47,7 +47,7 @@ from galaxy.model.custom_types import (
|
||||
MutableJSONType,
|
||||
TrimmedString,
|
||||
)
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.model.orm.util import add_object_to_object_session
|
||||
from galaxy.security.validate_user_input import validate_password_str
|
||||
from galaxy.util import unique_id
|
||||
|
||||
@@ -4,7 +4,7 @@ import time
|
||||
from galaxy import model
|
||||
from galaxy.jobs.runners import JobState
|
||||
from galaxy.jobs.runners.local import LocalJobRunner
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
|
||||
|
||||
class FailsJobRunner(LocalJobRunner):
|
||||
|
||||
@@ -9,7 +9,7 @@ from galaxy.managers.markdown_util import (
|
||||
ready_galaxy_markdown_for_export,
|
||||
to_basic_markdown,
|
||||
)
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from .base import BaseTestCase
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import json
|
||||
|
||||
from galaxy.model import WorkflowStep
|
||||
from galaxy.model.orm.now import now
|
||||
from galaxy.util import now
|
||||
from galaxy.model.store._bco_convert_utils import SoftwarePrerequisiteTracker
|
||||
from galaxy.schema.bco import (
|
||||
BioComputeObjectCore,
|
||||
|
||||
Reference in New Issue
Block a user