Pull request #28: Prefetch adjustment
Merge in RR/pyinfra from prefetch_adjustment to master
Squashed commit of the following:
commit 6f9d75bf49ad196bf5728386527499025ac27b3a
Author: Matthias Bisping <matthias.bisping@iqser.com>
Date: Thu Apr 21 13:47:40 2022 +0200
removed tests without much value that caused teardown problems with docker containers
commit b7ccbe20e3babbf1127ea5738a1d710d8029c90b
Merge: 51a459c 5925737
Author: Matthias Bisping <matthias.bisping@iqser.com>
Date: Thu Apr 21 13:04:34 2022 +0200
Merge branch 'sonarscan_refac' into prefetch_adjustment
commit 51a459cbf04e9884cf6b7c2c3145206ecf1a0ffb
Author: Matthias Bisping <matthias.bisping@iqser.com>
Date: Thu Apr 21 13:03:48 2022 +0200
set prefetch count to 1; removed obsolete imports
commit 592573793cdfd098012a98cfc7ab0cc1fbfd0e44
Author: Matthias Bisping <matthias.bisping@iqser.com>
Date: Tue Apr 19 18:01:46 2022 +0200
refactoring; cleanup
This commit is contained in:
parent
c933f66a4b
commit
a00ceae0e5
@ -8,19 +8,13 @@ source build_venv/bin/activate
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install dependency-check
|
||||
python3 -m pip install docker-compose
|
||||
|
||||
echo "coverage report generation"
|
||||
|
||||
python3 -m pip install coverage
|
||||
|
||||
# Install module & dependencies
|
||||
#python3 -m pip install -e .
|
||||
#python3 -m pip install -r requirements.txt
|
||||
|
||||
echo "docker-compose down"
|
||||
docker-compose down
|
||||
sleep 30
|
||||
|
||||
echo "coverage report generation"
|
||||
bash run_tests.sh
|
||||
|
||||
if [ ! -f reports/coverage.xml ]
|
||||
@ -28,8 +22,6 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#coverage run -m pytest pyinfra/test/ -x && coverage report -m && coverage xml
|
||||
|
||||
SERVICE_NAME=$1
|
||||
|
||||
echo "dependency-check:aggregate"
|
||||
|
||||
@ -72,6 +72,7 @@ class PikaQueueManager(QueueManager):
|
||||
|
||||
self.connection = pika.BlockingConnection(parameters=connection_params)
|
||||
self.channel = self.connection.channel()
|
||||
self.channel.basic_qos(prefetch_count=1)
|
||||
|
||||
if not dead_letter_queue:
|
||||
dead_letter_queue = CONFIG.rabbitmq.queues.dead_letter
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
from itertools import repeat
|
||||
import logging
|
||||
from functools import wraps
|
||||
from itertools import repeat
|
||||
from operator import attrgetter
|
||||
|
||||
from azure.storage.blob import ContainerClient, BlobServiceClient
|
||||
from retry import retry
|
||||
|
||||
from pyinfra.storage.adapters.adapter import StorageAdapter
|
||||
|
||||
|
||||
@ -2,9 +2,6 @@ import logging
|
||||
|
||||
import pytest
|
||||
|
||||
from pyinfra.storage.storage import Storage
|
||||
from pyinfra.storage.storages import get_azure_storage, get_s3_storage
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
@ -46,11 +43,3 @@ class TestStorage:
|
||||
storage.put_object(bucket_name, "file2", b"content 2")
|
||||
full_names_received = storage.get_all_object_names(bucket_name)
|
||||
assert {(bucket_name, "file1"), (bucket_name, "file2")} == {*full_names_received}
|
||||
|
||||
|
||||
def test_get_azure_storage_yields_storage():
|
||||
assert isinstance(get_azure_storage(), Storage)
|
||||
|
||||
|
||||
def test_get_s3_storage_yields_storage():
|
||||
assert isinstance(get_s3_storage(), Storage)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user