Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. each poll has open bool, early_results bool and close_date timestamp
  2.  
  3. desired behaviours:
  4. polls should be closed when their close_date occurs
  5. polls which are closed should have results available
  6. polls which are open and have early_results should have results available but not necessarily latest
  7. keep results generation to a minimum, it's not the least intensive procedure
  8.  
  9. actions:
  10. hourly, run a task that closes overrun polls + gens results and gens results for open early_results polls
  11. when information about a poll is requested, check if it's overrun - close and gen results
  12. when results are requested from an open early_results poll, serve results if they are in db otherwise gen
  13.  
  14. (INFORMATION ABOUT A POLL IS REQUESTED):
  15. get_poll
  16. get_results
  17.  
  18. (ALL ENDPOINTS):
  19. /
  20. /about
  21. /polls/new - get/post
  22. /polls/<poll_id> - get/post
  23. /polls/<poll_id>/results
  24. /polls/<poll_id>/delete - get/post
  25. /polls/<poll_id>/delete_by_email - get/post
  26. /polls/<poll_id>/delete_by_email/<token>
  27. /search - get/post
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement