mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-25 16:23:03 +02:00
Delete expired attachments based on mod time instead of DB entry to avoid races
This commit is contained in:
parent
3e53d8a2c7
commit
10a9aca2a1
6 changed files with 65 additions and 43 deletions
server
|
@ -344,10 +344,6 @@ func testCacheAttachments(t *testing.T, c *messageCache) {
|
|||
size, err = c.AttachmentBytesUsed("5.6.7.8")
|
||||
require.Nil(t, err)
|
||||
require.Equal(t, int64(0), size)
|
||||
|
||||
ids, err := c.AttachmentsExpired()
|
||||
require.Nil(t, err)
|
||||
require.Equal(t, []string{"m1"}, ids)
|
||||
}
|
||||
|
||||
func TestSqliteCache_Migration_From0(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue