Skip to content

Commit

Permalink
Merge pull request #12 from ESGF/replication-flow-type-correction
Browse files Browse the repository at this point in the history
Speculative correction for static type issues
  • Loading branch information
djspstfc authored Sep 2, 2024
2 parents b684d6b + 0e31230 commit 5349826
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ This UI provides a complete view of the stage of your Kafka service and is descr

### STAC Browser

A STAC browser simulating the **East** ESGF index is available at http://localhost:9011. This service should be listening
A STAC browser simulating the **East** ESGF index is available at http://localhost:9011. This service should be listening
to all the publication, retraction and update events in the Kafka queue.

A STAC browser simulating the **West** ESGF index is available at http://localhost:9015. This service should be listening
Expand Down
8 changes: 4 additions & 4 deletions esgf-transaction-api/esgf_transaction_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[Any, Any]:
app = FastAPI(lifespan=lifespan)


def item_body(payload) -> KafkaEvent:
def item_body(
payload: Union[RevokePayload, UpdatePayload, CreatePayload]
) -> KafkaEvent:
data = Data(type="STAC", version="1.0.0", payload=payload)
auth = Auth(client_id="esgf-generator", server="docker-compose-local")
publisher = Publisher(package="esgf-generator", version="0.1.0")
Expand Down Expand Up @@ -158,9 +160,7 @@ async def create_item(


@app.put("/{collection_id}/items/{item_id}")
async def update_item(
collection_id: str, item_id: str, item: Union[Item, ItemCollection]
) -> Union[Item, ItemCollection]:
async def update_item(collection_id: str, item_id: str, item: Item) -> Item:
"""Add UPDATE message to kafka event stream.
Args:
Expand Down

0 comments on commit 5349826

Please sign in to comment.