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
:remoteapp launchesGenServerwhen the application starts - DONE- Holds state %{max_number: :integer, timestamp: :etc_datetime} - DONE
:timestampstarts asniland is updated each time someone queries theGenServer- DONE:timestamprepresents the last time someone queried theGenServer- DONE
- Every 60 seconds, the
GenServerruns a job - DONE
- The
GenServerupdates every user's points value with a random value between 0..100 - DONE - The
Genserverupdates:max_numberin the state to a new random number between 0..100 - DONE
- The
GenServeraccepts a call to return Users with points greater than:max_numberwith a limit of2and the:timestampfrom 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