MCPcopy
hub / github.com/InstaPy/InstaPy / update_record

Function update_record

instapy/quota_supervisor.py:411–424  ·  view source on GitHub ↗

Update the corresponding record stored in the global Storage class

(job)

Source from the content-addressed store, hash-verified

409
410
411def update_record(job):
412 """Update the corresponding record stored in the global Storage class"""
413 # the order of the 2 conditional statements below is crucial
414 if today not in records.keys():
415 records.update({today: {this_hour: {}}})
416
417 elif this_hour not in records[today].keys():
418 records[today].update({this_hour: {}})
419
420 # get live record
421 live_rec = records[today][this_hour].get(job, 0) + 1
422
423 # update records
424 records[today][this_hour].update({job: live_rec})

Callers 1

quota_supervisorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected