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

Daily Pokemon do not refresh #34

Open
George-Spanos opened this issue Jan 4, 2024 · 0 comments
Open

Daily Pokemon do not refresh #34

George-Spanos opened this issue Jan 4, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@George-Spanos
Copy link
Contributor

George-Spanos commented Jan 4, 2024

Bug Description

Daily pokemon do not refresh.

Reason

@George-Spanos changed the app's infrastructure. Now it runs on fly.io and the machines that host the app auto stop if there is not traffic. This makes the app cheaper. As a result, on 12AM each day the app is probably "asleep" so this means that the cron does not run.

Proposed Solution

If the daily pokemon are not refreshed on app start, refresh them, and then bootstrap the app.

Steps

This is what I identified that we need to change for this to work

  1. Add a column to the daily_pokemon table which shows the date which the this specific batch of daily pokemon refer to. Name the column date, I think it's self explained.
  2. Make sure that whenever we add a pokemon to this list we also add the date column with the appropriate value.
  3. Modify the hasDailyPokemon function. This should return false if there are no daily pokemon for the current day the app started. If our logic is correct, they code should remove all daily pokemon and create new ones.

Let me know if you need any help. @Armaroth

@George-Spanos George-Spanos added the bug Something isn't working label Jan 4, 2024
@George-Spanos George-Spanos changed the title [Bug] - Daily Pokemon do not refresh TODO-47: Daily Pokemon do not refresh Jan 10, 2024
@George-Spanos George-Spanos changed the title TODO-47: Daily Pokemon do not refresh TODO-47 - Daily Pokemon do not refresh Jan 10, 2024
@George-Spanos George-Spanos changed the title TODO-47 - Daily Pokemon do not refresh LEAN-47 - Daily Pokemon do not refresh Jan 10, 2024
@George-Spanos George-Spanos changed the title LEAN-47 - Daily Pokemon do not refresh LEAN-47 Jan 10, 2024
@George-Spanos George-Spanos changed the title LEAN-47 LEAN-47: Daily Pokemon do not refresh Jan 10, 2024
@George-Spanos George-Spanos changed the title LEAN-47: Daily Pokemon do not refresh Daily Pokemon do not refresh Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants