diff options
author | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2019-07-22 17:41:37 +0100 |
---|---|---|
committer | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2019-07-30 09:14:02 +0100 |
commit | f97c5765507e2096a121187d6fe281d74e35e1ae (patch) | |
tree | 23ce758390f1616d240c17f71933f3b1aae9b6b0 | |
parent | Remove non-functional 'expire_access_token' setting (#5782) (diff) | |
download | synapse-f97c5765507e2096a121187d6fe281d74e35e1ae.tar.xz |
Remove dead and incorrect code.
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
-rw-r--r-- | synapse/storage/stats.py | 22 |
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) |