Skip to content

convert to async and refactor tests #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2022
Merged

convert to async and refactor tests #74

merged 2 commits into from
Mar 22, 2022

Conversation

philvarner
Copy link
Collaborator

@philvarner philvarner commented Mar 22, 2022

Related Issue(s):

Description:

  • convert to use stac-fastapi Async base clients and AsyncElasticsearchClient
  • refactor tests to use async
  • refactor more tests to use the Context fixture

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the changelog

@@ -29,13 +29,12 @@
"requests",
"ciso8601",
"overrides",
"starlette",
"httpx",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

httpx is an async client

@@ -2,7 +2,7 @@
import os
from typing import Set

from elasticsearch import Elasticsearch
from elasticsearch import AsyncElasticsearch, Elasticsearch
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we still need the sync Elasticsearch client b/c the bulk api does not support async yet.

@philvarner philvarner merged commit f10ffb0 into main Mar 22, 2022
@philvarner philvarner deleted the pv/async-clients branch March 22, 2022 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants