8. Context Refactor - abarr/remote GitHub Wiki
A quick check that everything is done on the GenServer
requirements.
Requirments
As it stands, the updated list looks like this
:remote
app launchesGenServer
when the application starts - DONE- Holds state %{max_number: :integer, timestamp: :etc_datetime} - DONE
:timestamp
starts asnil
and is updated each time someone queries theGenServer
- DONE:timestamp
represents the last time someone queried theGenServer
- DONE
- Every 60 seconds, the
GenServer
runs a job - DONE
- The
GenServer
updates every user's points value with a random value between 0..100 - DONE - The
Genserver
updates:max_number
in the state to a new random number between 0..100 - DONE
- The
GenServer
accepts a call to return Users with points greater than:max_number
with a limit of2
and the:timestamp
from the previous call. - DONE
Now that the GenServer
is working as expected and the requirements are complete. I am going to clean up the code a bit:
- Add in some comments
- Extract the business logic from the
GenServer
- Implement a Context API