Skip to content

Commit

Permalink
remove sse (#83)
Browse files Browse the repository at this point in the history
Remove SSE
  • Loading branch information
gagantrivedi authored Feb 27, 2024
1 parent 71f547f commit 4d7f892
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 492 deletions.
75 changes: 0 additions & 75 deletions .github/actions/sse-deploy-ecs/action.yml

This file was deleted.

7 changes: 1 addition & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Pull Request
on:
push:
branches:
- main #todo - remove
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

Expand All @@ -17,11 +17,6 @@ jobs:
FLAGSMITH_API_TOKEN: test_token
ENVIRONMENT_API_KEYS: placeholder_key1

services:
redis:
image: redis:7.0.7
ports: ["6379:6379"]

strategy:
max-parallel: 4
matrix:
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/sse-deploy-production-ecs.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/sse-deploy-staging-ecs.yml

This file was deleted.

11 changes: 0 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,3 @@ cd load-test
wrk -t10 -c40 -d5 -s post.lua -H 'X-Environment-Key: NC7zfaBWg7QJhbHpUMs7tv' 'http://localhost:8001/api/v1/identities/?identifier=development_user_123456'
```

# Realtime(SSE)

## Development

### Requirement:
* Redis: In order to run the test please make sure environment variables `REDIS_HOST`(default: localhost) and `REDIS_PORT`(default:6379) are set correctly





53 changes: 0 additions & 53 deletions infrastructure/aws/production/ecs-task-definition-sse.json

This file was deleted.

50 changes: 0 additions & 50 deletions infrastructure/aws/staging/ecs-task-definition-sse.json

This file was deleted.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ use_parentheses=true
multi_line_output=3
include_trailing_comma=true
line_length=79
known_first_party=['fastapi_utils']
4 changes: 0 additions & 4 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ python-dotenv
pydantic
orjson
httpx
# sse-stuff
sse-starlette
asyncio
redis
12 changes: 2 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ anyio==3.7.1
# fastapi
# httpcore
# starlette
asyncio==3.4.3
# via -r requirements.in
certifi==2023.7.22
# via
# httpcore
Expand Down Expand Up @@ -51,22 +49,16 @@ python-decouple==3.8
# via -r requirements.in
python-dotenv==1.0.0
# via -r requirements.in
redis==5.0.1
# via -r requirements.in
semver==2.13.0
# via flagsmith-flag-engine
sniffio==1.3.0
# via
# anyio
# httpcore
# httpx
sse-starlette==1.6.5
# via -r requirements.in
starlette==0.27.0
# via
# fastapi
# sse-starlette
typing-extensions==4.9.0
# via fastapi
typing-extensions==4.8.0
# via
# fastapi
# pydantic
Expand Down
2 changes: 0 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from .exceptions import FlagsmithUnknownKeyError
from .models import IdentityWithTraits
from .settings import Settings
from .sse import router as sse_router

app = FastAPI()
settings = Settings()
Expand Down Expand Up @@ -80,4 +79,3 @@ async def refresh_cache():
allow_headers=["*"],
)
app.add_middleware(GZipMiddleware, minimum_size=1000)
app.include_router(sse_router)
9 changes: 0 additions & 9 deletions src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,8 @@ class Settings(BaseSettings):
api_url: HttpUrl = "https://edge.api.flagsmith.com/api/v1"
api_poll_frequency: int = 10 # minutes
api_poll_timeout: int = 5 # seconds

endpoint_caches: EndpointCachesSettings | None = None

# sse settings
stream_delay: int = 1 # seconds
retry_timeout: int = 15000 # milliseconds
max_stream_age: int = 30 # seconds
allow_origins: List[str] = ["*"]
sse_authentication_token: str = ""
redis_host: str = "localhost"
redis_port: int = 6379

class Config:
@classmethod
Expand Down
Loading

0 comments on commit 4d7f892

Please sign in to comment.