Skip to content

Commit

Permalink
1.4.2: fix async calls in request CS
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Dec 11, 2022
1 parent da5294f commit 0342b05
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ dev: ## Set the GCP project to dev

clean:
rm -rf env build **/wandb **/embeddings **/indexes *.egg-info **/index_infos.json **/__pycache__
# git add --all -- :!notebooks

release:
@VERSION=$$(cat setup.py | grep version | cut -d '"' -f 2); \
echo "Releasing version $$VERSION"; \
git add --all -- :!notebooks; \
read -p "Commit content:" COMMIT; \
git add langame setup.py run Makefile; \
echo "Committing '$$VERSION: $$COMMIT'"; \
git commit -m "$$VERSION: $$COMMIT"; \
git push origin main; \
Expand Down
7 changes: 3 additions & 4 deletions langame/functions/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,16 @@ async def generate() -> Tuple[Optional[DocumentSnapshot], Optional[dict]]:
)
+ new_history
)
# don't wait these meta updates
t1 = org_doc.reference.update(
# sync
org_doc.reference.update(
{
"credits": firestore.Increment(-1),
"lastSpent": firestore.SERVER_TIMESTAMP,
}
)
t2 = conversation_starters_history_docs.reference.set(
await conversation_starters_history_docs.reference.set(
{"conversation_starters": conversation_starters_history}, merge=True
)
await asyncio.gather(t1, t2)

# Return the conversation starters
return conversation_starters, None
4 changes: 2 additions & 2 deletions run/collection/service.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ spec:
spec:
containerConcurrency: 5
containers:
image: gcr.io/langame-86ac4/collection:1.1.8
image: gcr.io/langame-86ac4/collection:1.1.9
ports:
- containerPort: 8080
name: http1
env:
- name: GET_MEMES_URL
value: "https://us-central1-langame-86ac4.cloudfunctions.net/getMemes"
- name: SENTRY_RELEASE
value: "1.1.8"
value: "1.1.9"
- name: ENVIRONMENT
value: "production"
resources:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
name="langame",
packages=find_packages(),
include_package_data=True,
version="1.4.1",
version="1.4.2",
description="",
install_requires=[
"firebase_admin",
Expand Down

0 comments on commit 0342b05

Please sign in to comment.