MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / processRequestLog

Function processRequestLog

plugins/OptionalManager/OptionalManagerPlugin.py:33–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32
33def processRequestLog():
34 if request_log:
35 content_db = ContentDbPlugin.content_db
36 cur = content_db.getCursor()
37 num = 0
38 for site_id in request_log:
39 for inner_path, uploaded in request_log[site_id].items():
40 content_db.execute(
41 "UPDATE file_optional SET uploaded = uploaded + %s WHERE ?" % uploaded,
42 {"site_id": site_id, "inner_path": inner_path}
43 )
44 num += 1
45 request_log.clear()
46
47
48if "access_log" not in locals().keys(): # To keep between module reloads

Callers

nothing calls this directly

Calls 3

getCursorMethod · 0.80
itemsMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected