Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
noxethiems committed Dec 5, 2023
1 parent be3661b commit ba4061d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
18 changes: 9 additions & 9 deletions deploy/docker-compose.okteto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ services:
image: identity_socializer:${IDENTITY_SOCIALIZER_VERSION:-latest}
restart: always
env_file:
- ../.env.remote
- ../.env.remote
depends_on:
db:
condition: service_healthy
ports:
# Exposes application port.
- "8000:8000"
- "8000:8000"
environment:
IDENTITY_SOCIALIZER_HOST: 0.0.0.0
IDENTITY_SOCIALIZER_DB_HOST: db
Expand All @@ -31,7 +31,7 @@ services:
POSTGRES_USER: "identity_socializer"
POSTGRES_DB: "identity_socializer"
volumes:
- identity_socializer-db-data:/var/lib/postgresql/data
- identity_socializer-db-data:/var/lib/postgresql/data
restart: always
healthcheck:
test: pg_isready -U identity_socializer
Expand All @@ -56,9 +56,9 @@ services:
mongo-db:
image: mongo:latest
ports:
- "27017:27017"
- "27017:27017"
volumes:
- identity_socializer-db-mongo-data:/data/db
- identity_socializer-db-mongo-data:/data/db

mongo-express:
image: mongo-express
Expand All @@ -70,19 +70,19 @@ services:
ME_CONFIG_BASICAUTH_USERNAME: "[email protected]"
ME_CONFIG_BASICAUTH_PASSWORD: "admin"
ports:
- "8081:8081"
- "8081:8081"
depends_on:
- mongo-db
- mongo-db

pgadmin:
image: dpage/pgadmin4:8.0
environment:
PGADMIN_DEFAULT_EMAIL: "[email protected]"
PGADMIN_DEFAULT_PASSWORD: "admin"
ports:
- "5050:80"
- "5050:80"
depends_on:
- db
- db

volumes:
identity_socializer-db-data:
Expand Down
3 changes: 1 addition & 2 deletions identity_socializer/services/push_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ async def new_trending(
user_dao: UserDAO,
) -> None:
"""Send push notification for new trending topic."""

# Create and save notification to database
title = f"#{topic_title} is trending!"
body = "Tap to join the conversation."
Expand Down Expand Up @@ -97,7 +96,7 @@ async def new_like(
for push_token in push_tokens:
data = {
"screen": "LikeNotification",
"params": snap
"params": snap,
}
print("before _create_push_notification")
print(f"data: {data}")
Expand Down
4 changes: 2 additions & 2 deletions identity_socializer/web/api/notification/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
)



@router.get("/get_all", response_model=None)
async def new_all_notifications() -> Any:
"""Creates a notification for new like event."""
Expand Down Expand Up @@ -58,10 +57,11 @@ async def new_trending_notification(
"""Creates a notification for new like event."""
await push_notifications.new_trending(
topic,
user_dao,
push_token_dao,
user_dao,
)


@router.post("/new_like", response_model=None)
async def new_like_notification(
body: NotificationDTO,
Expand Down
20 changes: 10 additions & 10 deletions okteto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ build:
dockerfile: deploy/Dockerfile
deploy:
compose:
- file: deploy/docker-compose.okteto.yml
- file: deploy/docker-compose.okteto.yml
endpoints:
- path: /
service: api
port: 8000
- path: /mongodb
service: mongo-db
port: 8081
- path: /db
service: pgadmin
port: 5050
- path: /
service: api
port: 8000
- path: /mongodb
service: mongo-db
port: 8081
- path: /db
service: pgadmin
port: 5050
namespace: identity-socializer-luiscusihuaman

0 comments on commit ba4061d

Please sign in to comment.