Minor style changes and removed unnecesary comments

explicit_write_pps_on_exit
Esmeralda Gallardo 2023-02-24 15:11:15 -03:00
parent f96d6a04b6
commit b96e2c314a
No known key found for this signature in database
GPG Key ID: AD67FBB417CAC71B
3 changed files with 10 additions and 18 deletions

View File

@ -139,9 +139,10 @@ class Container:
while True: while True:
try: try:
logs = self.cntr.logs() logs = self.cntr.logs()
except docker.errors.NotFound: except (
return False docker.errors.NotFound,
except docker.errors.APIError: docker.errors.APIError
):
return False return False
entries = logs.decode().split('\n') entries = logs.decode().split('\n')

View File

@ -14,22 +14,11 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
``elasticsearch`` integration.
- client management routines
- ticK data ingest routines
- websocket client for subscribing to write triggers
- todo: tick sequence stream-cloning for testing
'''
from __future__ import annotations from __future__ import annotations
from contextlib import asynccontextmanager as acm from contextlib import asynccontextmanager as acm
from pprint import pformat from pprint import pformat
from typing import ( from typing import (
Any, Any,
# Optional,
#Union,
TYPE_CHECKING, TYPE_CHECKING,
) )

View File

@ -9,8 +9,9 @@ from piker.log import get_logger
from elasticsearch import Elasticsearch from elasticsearch import Elasticsearch
from piker.data import marketstore from piker.data import marketstore
def test_marketstore( def test_marketstore_startup_and_version(
open_test_pikerd: AsyncContextManager, open_test_pikerd: AsyncContextManager,
loglevel,
): ):
''' '''
@ -24,7 +25,7 @@ def test_marketstore(
async with ( async with (
open_test_pikerd( open_test_pikerd(
loglevel='info', loglevel=loglevel,
tsdb=True tsdb=True
) as (s, i, pikerd_portal, services), ) as (s, i, pikerd_portal, services),
marketstore.get_client() as client marketstore.get_client() as client
@ -39,8 +40,9 @@ def test_marketstore(
trio.run(main) trio.run(main)
def test_elasticsearch( def test_elasticsearch_startup_and_version(
open_test_pikerd: AsyncContextManager, open_test_pikerd: AsyncContextManager,
loglevel,
): ):
''' '''
Verify elasticsearch starts correctly Verify elasticsearch starts correctly
@ -53,7 +55,7 @@ def test_elasticsearch(
port = 19200 port = 19200
async with open_test_pikerd( async with open_test_pikerd(
loglevel='info', loglevel=loglevel,
es=True es=True
) as (s, i, pikerd_portal, services): ) as (s, i, pikerd_portal, services):