Skip to content

Commit

Permalink
let it read from env for now.
Browse files Browse the repository at this point in the history
This will be changed later once the functionalities depending on this
service reading the default sync days from envs are changed
  • Loading branch information
adnanhashmi09 committed Aug 7, 2024
1 parent 0d421a5 commit 0901fe8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ARG REDIS_ENABLED=true
ARG BACKEND_ENABLED=true
ARG FRONTEND_ENABLED=true
ARG CRON_ENABLED=true
ARG DEFAULT_SYNC_DAYS=31
ARG BUILD_DATE
ARG MERGE_COMMIT_SHA

Expand Down Expand Up @@ -48,6 +49,7 @@ ENV INTERNAL_SYNC_API_BASE_URL=http://localhost:9697
ENV NEXT_PUBLIC_APP_ENVIRONMENT="prod"
ENV BUILD_DATE=$BUILD_DATE
ENV MERGE_COMMIT_SHA=$MERGE_COMMIT_SHA
ENV DEFAULT_SYNC_DAYS=$DEFAULT_SYNC_DAYS

WORKDIR /app
COPY --from=backend-build /opt/venv /opt/venv
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ To set up middleware locally, follow these steps:
REDIS_PORT=6385
ANALYTICS_SERVER_PORT=9696
SYNC_SERVER_PORT=9697
DEFAULT_SYNC_DAYS=31
```

- Start the backend servers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@

class CodeETLHandler:

DEFAULT_SYNC_DAYS = 31
DEFAULT_SYNC_DAYS = (
int(getenv("DEFAULT_SYNC_DAYS")) if getenv("DEFAULT_SYNC_DAYS") else 31
)

def __init__(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

class IncidentsETLHandler:

DEFAULT_SYNC_DAYS = 31
DEFAULT_SYNC_DAYS = (
int(getenv("DEFAULT_SYNC_DAYS")) if getenv("DEFAULT_SYNC_DAYS") else 31
)

def __init__(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@

class WorkflowETLHandler:

DEFAULT_SYNC_DAYS = 31
DEFAULT_SYNC_DAYS = (
int(getenv("DEFAULT_SYNC_DAYS")) if getenv("DEFAULT_SYNC_DAYS") else 31
)

def __init__(
self,
Expand Down
1 change: 1 addition & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ ANALYTICS_SERVER_PORT=9696
INTERNAL_API_BASE_URL=http://localhost:9696
INTERNAL_SYNC_API_BASE_URL=http://localhost:9697
NEXT_PUBLIC_APP_ENVIRONMENT="development"
DEFAULT_SYNC_DAYS=31
BUILD_DATE=2024-06-05T10:21:34Z
MERGE_COMMIT_SHA=5f9ff895ad1d7805edcb22bfe2fcc6129e33bd8c

0 comments on commit 0901fe8

Please sign in to comment.