()
| 31 | |
| 32 | |
| 33 | def 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 | |
| 48 | if "access_log" not in locals().keys(): # To keep between module reloads |