Merge branch '2.0.0' of ssh://git.iqser.com:2222/rr/pyinfra into image-prediction-v2-support
This commit is contained in:
commit
37c536324e
@ -5,8 +5,8 @@ from funcy import project, identity, rcompose
|
||||
|
||||
from pyinfra.callback import Callback
|
||||
from pyinfra.config import parse_disjunction_string
|
||||
from pyinfra.file_descriptor_builder import RedFileDescriptorBuilder
|
||||
from pyinfra.file_descriptor_manager import FileDescriptorManager
|
||||
from pyinfra.file_descriptor_builder import FileDescriptorBuilder, RedFileDescriptorBuilder
|
||||
from pyinfra.pipeline_factory import CachedPipelineFactory
|
||||
from pyinfra.queue.consumer import Consumer
|
||||
from pyinfra.queue.queue_manager.pika_queue_manager import PikaQueueManager
|
||||
@ -96,7 +96,7 @@ class ComponentFactory:
|
||||
def get_operation_file_descriptor_builder(self):
|
||||
return RedFileDescriptorBuilder(
|
||||
operation2file_patterns=self.get_operation2file_patterns(),
|
||||
default_operation_name=self.config.service.operation
|
||||
default_operation_name=self.config.service.operation,
|
||||
)
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
|
||||
@ -52,6 +52,7 @@ class Downloader:
|
||||
|
||||
def get_pattern_filter(self, queue_item_body):
|
||||
file_pattern = self.file_descriptor_manager.build_input_matcher(queue_item_body)
|
||||
|
||||
logger.debug(f"Filtering pattern: {file_pattern if len(file_pattern) <= 120 else (file_pattern[:120]+'...')}")
|
||||
matches_pattern = flift(file_pattern)
|
||||
return matches_pattern
|
||||
|
||||
2
test/fixtures/input.py
vendored
2
test/fixtures/input.py
vendored
@ -6,8 +6,8 @@ import pytest
|
||||
from PIL import Image
|
||||
from funcy import lmap, compose, flatten, lflatten, omit, second, first, lzip, merge
|
||||
|
||||
from pyinfra.server.nothing import Nothing
|
||||
from pyinfra.server.normalization import normalize_item
|
||||
from pyinfra.server.nothing import Nothing
|
||||
from pyinfra.server.packing import pack, unpack
|
||||
from pyinfra.utils.func import star, lift, lstarlift
|
||||
from test.utils.image import image_to_bytes
|
||||
|
||||
17
test/fixtures/server.py
vendored
17
test/fixtures/server.py
vendored
@ -2,7 +2,6 @@ import io
|
||||
import logging
|
||||
import socket
|
||||
from collections import Counter
|
||||
from itertools import count
|
||||
from multiprocessing import Process
|
||||
from operator import itemgetter
|
||||
from typing import Generator
|
||||
@ -147,14 +146,14 @@ def core_operation(many_to_n, item_type, one_to_many, analysis_task):
|
||||
"image": {False: rotate},
|
||||
},
|
||||
},
|
||||
# False: {
|
||||
# "string": {False: upper},
|
||||
# "image": {False: rotate, True: classify},
|
||||
# },
|
||||
# True: {
|
||||
# "string": {False: extract},
|
||||
# "pdf": {False: stream_pages},
|
||||
# },
|
||||
# False: {
|
||||
# "string": {False: upper},
|
||||
# "image": {False: rotate, True: classify},
|
||||
# },
|
||||
# True: {
|
||||
# "string": {False: extract},
|
||||
# "pdf": {False: stream_pages},
|
||||
# },
|
||||
}
|
||||
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user