Skip to content
代码片段 群组 项目
提交 eb3af4d0 编辑于 作者: Kassio Borges's avatar Kassio Borges 提交者: Tetiana Chupryna
浏览文件

Use cronjob to delete old pages deployments

Currently, the deletion of deprecated pages deployments is based on the
idea that each project must have only 1 active `PagesDeployment` in
a given moment. With the work to introduce [Gitlab Pages Multiple
Versions], a project now will have to support multiple `PagesDeployment`
at the same time.

For this reason, `PagesDeployment#deleted_at` field was [introduced] to
enable us to delete deprecated jobs by setting their `deleted_at` to the
minimal timestamp when it's safe to delete them from the database.

Now, we're replacing the `DestroyPagesDeploymentsWorker` by
`Pages::DeprecatedDeploymentsDeleteCronWorker` when creating a new pages
deployment, which will delete only depreacted `PagesDeployment` records,
in other words, all `PagesDeployment` records that where `deleted_at` is
not in the future.

[Gitlab Pages Multiple Versions]: https://gitlab.com/groups/gitlab-org/-/epics/10914
[introduced]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130848

Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/425939

Changelog: changed
上级 b527fcef
No related branches found
No related tags found
无相关合并请求
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册