Python Forum
Student project - alert action when X happens Y amt of times, how?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Student project - alert action when X happens Y amt of times, how?
#2
Yes, if your "checker" is hitting an external API you don't want to do that constantly. Often you don't need to be up-to-the-second, so polling at an interval (say 20 minutes) is sufficient but doesn't overload external servers.

Think about if this should happen in an interval. Do you want to know if this happens 3 times ever? Or maybe 3 times in a calendar day, or 3 times in a 24 hour period? So you'll have to have a counter and some method to reset the counter.

The checker depends on the specific API. Nice would be to keep track of the last time you checked. Then ask the API for any events since that time. That cuts down the data that gets transmitted. Otherwise you might have to parse a lot of data and see if any of it is in the relevant time frame.
Reply


Messages In This Thread
RE: Student project - alert action when X happens Y amt of times, how? - by bowlofred - Aug-23-2021, 03:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Student grader and sorter for assignment RazeAD 7 4,821 Feb-11-2021, 06:29 AM
Last Post: RazeAD
  Generating a student's transcript [OOP concept] aongkeko 2 3,745 Dec-01-2020, 06:43 AM
Last Post: buran
  Create code for input names and score for 15 student Davin 2 2,943 Sep-21-2020, 08:49 AM
Last Post: DeaD_EyE
  New Python Student = Does this code look right? musicjoeyoung 6 5,021 May-07-2020, 02:39 PM
Last Post: musicjoeyoung
  Student grade program help debug ccm1776 3 8,365 Nov-14-2018, 02:41 AM
Last Post: stullis
  Find how many times a user played an artist and how many times disruptfwd8 1 3,359 May-04-2018, 08:32 AM
Last Post: killerrex

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020