Reduce the file-change snapshot taking ratio.

Until now, a file `data` snapshot was persisted on every file_change
row. That causes a lot of IO load and increase disk usage without
a real benefit.

This commit reduces the snapshot generation; now the snapshot
is persisted every 20 update-file or when a file is not touched
in 3 hours or more.
This commit is contained in:
Andrey Antukh 2021-06-10 15:37:56 +02:00 committed by Alonso Torres
parent 371c78b1d3
commit 024cc88738
3 changed files with 17 additions and 2 deletions

View file

@ -187,6 +187,9 @@
{:name "0059-mod-audit-log-table"
:fn (mg/resource "app/migrations/sql/0059-mod-audit-log-table.sql")}
{:name "0060-mod-file-change-table"
:fn (mg/resource "app/migrations/sql/0060-mod-file-change-table.sql")}
])