|
1 | | -import magic |
2 | 1 | import logging |
3 | | -from timeit import default_timer |
4 | | -from tempfile import mkdtemp |
5 | 2 | from datetime import datetime |
6 | | -from pkg_resources import get_distribution |
| 3 | +from tempfile import mkdtemp |
| 4 | +from timeit import default_timer |
7 | 5 |
|
8 | | -from followthemoney import model |
| 6 | +import magic |
9 | 7 | from banal import ensure_list |
| 8 | +from followthemoney import model |
| 9 | +from followthemoney.helpers import entity_filename |
| 10 | +from followthemoney.namespace import Namespace |
| 11 | +from ftmq.store.fragments.utils import safe_fragment |
10 | 12 | from normality import stringify |
11 | 13 | from pantomime import normalize_mimetype |
12 | | -from ftmstore.utils import safe_fragment |
| 14 | +from pkg_resources import get_distribution |
| 15 | +from prometheus_client import Counter, Histogram |
| 16 | +from sentry_sdk import capture_exception |
13 | 17 | from servicelayer.archive import init_archive |
14 | 18 | from servicelayer.archive.util import ensure_path |
15 | 19 | from servicelayer.extensions import get_extensions |
16 | | -from sentry_sdk import capture_exception |
17 | | -from followthemoney.helpers import entity_filename |
18 | | -from followthemoney.namespace import Namespace |
19 | | -from prometheus_client import Counter, Histogram |
20 | 20 |
|
| 21 | +from ingestors import settings |
21 | 22 | from ingestors.directory import DirectoryIngestor |
22 | | -from ingestors.exc import ProcessingException, ENCRYPTED_MSG |
| 23 | +from ingestors.exc import ENCRYPTED_MSG, ProcessingException |
23 | 24 | from ingestors.util import filter_text, remove_directory |
24 | | -from ingestors import settings |
25 | 25 |
|
26 | 26 | log = logging.getLogger(__name__) |
27 | 27 |
|
@@ -68,9 +68,9 @@ class Manager(object): |
68 | 68 | """Handles the lifecycle of an ingestor. This can be subclassed to embed it |
69 | 69 | into a larger processing framework.""" |
70 | 70 |
|
71 | | - #: Indicates that during the processing no errors or failures occured. |
| 71 | + #: Indicates that during the processing no errors or failures occurred. |
72 | 72 | STATUS_SUCCESS = "success" |
73 | | - #: Indicates occurance of errors during the processing. |
| 73 | + #: Indicates occurrence of errors during the processing. |
74 | 74 | STATUS_FAILURE = "failure" |
75 | 75 |
|
76 | 76 | MAGIC = magic.Magic(mime=True) |
|
0 commit comments