Fix file pruning
This commit is contained in:
parent
1e5e3e9f16
commit
5b0ad2f253
|
@ -243,7 +243,7 @@ pub async fn prune_files(file_expiration: i64) {
|
|||
for room in rooms {
|
||||
// It's not catastrophic if we fail to prune the database for a given room
|
||||
let pool = pool_by_room_id(&room);
|
||||
let now = chrono::Utc::now().timestamp();
|
||||
let now = chrono::Utc::now().timestamp_nanos();
|
||||
let expiration = now - file_expiration;
|
||||
// Get a database connection and open a transaction
|
||||
let conn = match pool.get() {
|
||||
|
|
Loading…
Reference in New Issue