MCPcopy
hub / github.com/InstaPy/InstaPy / get_record

Function get_record

instapy/quota_supervisor.py:395–408  ·  view source on GitHub ↗

Quickly get and return daily or hourly records

(job, interval)

Source from the content-addressed store, hash-verified

393
394
395def get_record(job, interval):
396 """Quickly get and return daily or hourly records"""
397 try:
398 if interval == "hourly":
399 record = records[today][this_hour][job]
400
401 elif interval == "daily":
402 record = sum(i[1][job] for i in list(records[today].items()))
403
404 except KeyError:
405 # record does not yet exist
406 record = 0
407
408 return record
409
410
411def update_record(job):

Callers 1

inspectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected