Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7066598
D3914.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D3914.id.diff
View Options
diff --git a/swh/lister/cli.py b/swh/lister/cli.py
--- a/swh/lister/cli.py
+++ b/swh/lister/cli.py
@@ -1,18 +1,18 @@
-# Copyright (C) 2018-2019 The Software Heritage developers
+# Copyright (C) 2018-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
+# WARNING: do not import unnecessary things here to keep cli startup time under
+# control
import os
import logging
from copy import deepcopy
import click
-from sqlalchemy import create_engine
from swh.core.cli import CONTEXT_SETTINGS
from swh.lister import get_lister, SUPPORTED_LISTERS, LISTERS
-from swh.lister.core.models import initialize
logger = logging.getLogger(__name__)
@@ -81,6 +81,8 @@
"""Initialize the database model for given listers.
"""
+ from sqlalchemy import create_engine
+ from swh.lister.core.models import initialize
cfg = ctx.obj["config"]
lister_cfg = cfg["lister"]
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Nov 5 2024, 3:43 PM (11 w, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217673
Attached To
D3914: cli: speedup the `swh` cli command startup time
Event Timeline
Log In to Comment