summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-07-22 17:41:37 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-07-30 09:14:02 +0100
commitf97c5765507e2096a121187d6fe281d74e35e1ae (patch)
tree23ce758390f1616d240c17f71933f3b1aae9b6b0
parentRemove non-functional 'expire_access_token' setting (#5782) (diff)
downloadsynapse-f97c5765507e2096a121187d6fe281d74e35e1ae.tar.xz
Remove dead and incorrect code.
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
-rw-r--r--synapse/storage/stats.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py

index e13efed417..4ca38e6806 100644 --- a/synapse/storage/stats.py +++ b/synapse/storage/stats.py
@@ -465,20 +465,12 @@ class StatsStore(StateDeltasStore): self._simple_insert_txn(txn, table=table, values=values) # actually update the new value - if stats_type in ABSOLUTE_STATS_FIELDS[stats_type]: - self._simple_update_txn( - txn, - table=table, - keyvalues={id_col: stats_id, "ts": current_ts}, - updatevalues={field: value}, - ) - else: - sql = ("UPDATE %s SET %s=%s+? WHERE %s=? AND ts=?") % ( - table, - field, - field, - id_col, - ) - txn.execute(sql, (value, stats_id, current_ts)) + sql = ("UPDATE %s SET %s=%s+? WHERE %s=? AND ts=?") % ( + table, + field, + field, + id_col, + ) + txn.execute(sql, (value, stats_id, current_ts)) return self.runInteraction("update_stats_delta", _update_stats_delta)