astrojuanlu / meetup-checkin

3 stars 1 forks source link

Automate active meetup detection #4

Open astrojuanlu opened 1 year ago

astrojuanlu commented 1 year ago

Right now we have to change an environment variable in the deployment to make it work:

https://github.com/astrojuanlu/meetup-checkin/blob/0675d612ea5ca071cd5ede1cd64a68e78bf83537/app.py#L187-L189

And, if we forget to do it (like it happened yesterday), then some people cannot check in:

sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "checkins_user_event_unique"
DETAIL:  Key (meetup_id, event_id)=(374706160, 288281545) already exists.
[SQL: INSERT INTO
checkins (meetup_id, event_id, name, email, photographs_consent, email_consent)
VALUES
(%(meetup_id)s, %(event_id)s, %(name)s, %(email)s, %(photographs_consent)s, %(email_consent)s);
]

We should automate this.