[MM-44489] Cloud limits: enforcing files (#20703)

* Update last accessible file time

* Filter fileInfos

* Set inaccessible header

* Fix lint issue

* Fix lint issue

* Fix i18n

* add nil check

* Fix merge conflicts

* Add helper functions to clear out inaccessible files content

* Remove content for inaccessible files

* Fix typo

* wip

* Remove InaccessibleContent field, instead use Archived

* Add store tests

* Add tests

* Add separate funcs to ignore cloud limits

* Use separate query for MySql

* Use GetReplicaX

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Vishal
2022-09-28 22:22:53 +05:30
коммит произвёл GitHub
родитель b9834a2fc2
Коммит f5f036d94b
27 изменённых файлов: 984 добавлений и 21 удалений

Просмотреть файл

@@ -46,6 +46,7 @@ import (
"github.com/mattermost/mattermost-server/v6/jobs/extract_content"
"github.com/mattermost/mattermost-server/v6/jobs/import_delete"
"github.com/mattermost/mattermost-server/v6/jobs/import_process"
"github.com/mattermost/mattermost-server/v6/jobs/last_accessible_file"
"github.com/mattermost/mattermost-server/v6/jobs/last_accessible_post"
"github.com/mattermost/mattermost-server/v6/jobs/migrations"
"github.com/mattermost/mattermost-server/v6/jobs/notify_admin"
@@ -1870,6 +1871,12 @@ func (s *Server) initJobs() {
last_accessible_post.MakeScheduler(s.Jobs, s.License()),
)
s.Jobs.RegisterJobType(
model.JobTypeLastAccessibleFile,
last_accessible_file.MakeWorker(s.Jobs, s.License(), New(ServerConnector(s.Channels()))),
last_accessible_file.MakeScheduler(s.Jobs, s.License()),
)
s.Jobs.RegisterJobType(
model.JobTypeUpgradeNotifyAdmin,
notify_admin.MakeUpgradeNotifyWorker(s.Jobs, s.License(), New(ServerConnector(s.Channels()))),