Skip to content

Commit

Permalink
Merge pull request #14 from mavic111/develop
Browse files Browse the repository at this point in the history
[Revalidation] Remove page revalidation function
  • Loading branch information
mavic111 authored May 12, 2023
2 parents b012eb4 + 40b1908 commit 073e6b3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
13 changes: 1 addition & 12 deletions api/v1/broadcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from db import get_session
from pywebpush import webpush, WebPushException
from pydantic import ValidationError
from client import client


router = APIRouter()

Expand Down Expand Up @@ -69,17 +69,6 @@ async def broadcast(
results = db.exec(statement)
for subscription in results:
background_tasks.add_task(push_notification, subscription, push_content, db)
try:
print("Revalidating frontend notifications page")
res = await client.get(
settings.CORS_HOSTNAME + "/api/revalidate",
params={"tag": "notifications"},
headers={"content-type": "application/json"},
)
print(res.url)
print(res.status_code)
except:
pass
return db_push_content
except ValidationError:
raise HTTPException(status_code=422, detail="ValidationError")
4 changes: 0 additions & 4 deletions client.py

This file was deleted.

Binary file modified requirements.txt
Binary file not shown.

1 comment on commit 073e6b3

@vercel
Copy link

@vercel vercel bot commented on 073e6b3 May 12, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

fastpush – ./

fastpush.vercel.app
fastpush-mavic111.vercel.app
fastpush-git-main-mavic111.vercel.app

Please sign in to comment.