Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Migrate Python code to TypeScript Serverless #35

Merged
merged 1 commit into from
Nov 5, 2023
Merged

Conversation

deuzu
Copy link
Member

@deuzu deuzu commented Oct 29, 2023

To do

  • Synchro
  • Restrictions API
  • Alert level count API
  • Alert subscription API
  • Alert Dispatch to subscribed users
  • Clean types in TypeScript
  • Tests
  • Automatic deployment

Sorry, something went wrong.

.env.*

# Local files
data/
Copy link
Member Author

Choose a reason for hiding this comment

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

Pour y stocker les fichier de geozones, decree & restrictions pour faciliter le dev

@@ -20,7 +20,7 @@ CREATE TABLE decree(
geozone_id INT REFERENCES geozone (id) NOT NULL,
alert_level VARCHAR(100) NOT NULL,
start_date date NOT NULL,
end_date date NOT NULL,
end_date date,
Copy link
Member Author

Choose a reason for hiding this comment

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

Certains arrêtés n'ont pas de date de fin

Comment on lines 9 to 13
vpc:
securityGroupIds:
- sg-0be658856297e3899
subnetIds:
- subnet-0d33d0cd93f1a9377
Copy link
Member Author

Choose a reason for hiding this comment

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

C'est ce qui permet d'acceder à la DB. Ça à été créé via Terraform.

handler: handlers/synchronize-geozones.default
events:
- schedule: cron(0 2 * * ? *)
timeout: 60
Copy link
Member Author

Choose a reason for hiding this comment

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

S'execute en ~20 secondes

handler: handlers/synchronize-decrees.default
events:
- schedule: cron(0 3 * * ? *)
timeout: 60
Copy link
Member Author

Choose a reason for hiding this comment

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

S'execute en ~10 secondes

handler: handlers/synchronize-restrictions.default
events:
- schedule: cron(0 4 * * ? *)
timeout: 600
Copy link
Member Author

Choose a reason for hiding this comment

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

S'execute en ~5 minutes

@deuzu deuzu force-pushed the serverless branch 3 times, most recently from bece1f3 to 73e5fa7 Compare November 3, 2023 16:23
Copy link
Collaborator

@clarani clarani left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@clarani clarani merged commit 4de7e33 into main Nov 5, 2023
@clarani clarani deleted the serverless branch November 5, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants