mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-09-02 07:03:49 +00:00
fix: ignore pending XFTP files in storage accounting (#1814)
* fix: ignore pending XFTP files in storage accounting * style --------- Co-authored-by: Paul Bottinelli <paul.bottinelli@trailofbits.com>
This commit is contained in:
co-authored by
Paul Bottinelli
parent
74a86043cc
commit
b2bdade380
@@ -164,7 +164,7 @@ instance FileStoreClass PostgresFileStore where
|
||||
|
||||
getUsedStorage st =
|
||||
withTransaction (dbStore st) $ \db -> do
|
||||
[Only total] <- DB.query_ db "SELECT COALESCE(SUM(file_size::BIGINT), 0)::BIGINT FROM files"
|
||||
[Only total] <- DB.query_ db "SELECT COALESCE(SUM(file_size::BIGINT), 0)::BIGINT FROM files WHERE file_path IS NOT NULL"
|
||||
pure total
|
||||
|
||||
getFileCount st =
|
||||
|
||||
Reference in New Issue
Block a user