jojo/options/locale_next
Earl Warren 238ecfdeb8 fix: garbage collect lingering actions logs (#10009)
If, for any reason (e.g. server crash), a task is recorded as done in the database but the logs are still in the database instead of being in storage, they need to be collected.

The log_in_storage field is only set to true after the logs have been transfered to storage and can be relied upon to reflect which tasks have lingering logs.

A cron job collects lingering logs every day, 3000 at a time, sleeping one second between them. In normal circumstances there will be only a few of them, even on a large instance, and there is no need to collect them as quickly as possible.

When there are a lot of them for some reason, garbage collection must happen at a rate that is not too hard on storage I/O.

Refs https://codeberg.org/forgejo/forgejo/issues/9999

---

Note on backports: the v11 backport is done manually because of minor conflicts. https://codeberg.org/forgejo/forgejo/pulls/10024

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/10009): <!--number 10009 --><!--line 0 --><!--description Z2FyYmFnZSBjb2xsZWN0IGxpbmdlcmluZyBhY3Rpb25zIGxvZ3M=-->garbage collect lingering actions logs<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10009
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-11-18 18:59:01 +01:00
..
locale_ar.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_be.json i18n: update of translations from Codeberg Translate 2025-07-16 16:30:00 +00:00
locale_bg.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_bn.json i18n: update of translations from Codeberg Translate 2025-07-11 05:58:02 +00:00
locale_bs.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_ca.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_cs-CZ.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_cy.json i18n: update of translations from Codeberg Translate 2025-08-31 04:51:49 +00:00
locale_da.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_de-DE.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_el-GR.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_en-US.json fix: garbage collect lingering actions logs (#10009) 2025-11-18 18:59:01 +01:00
locale_eo.json i18n: update of translations from Codeberg Translate 2025-10-30 09:21:06 +00:00
locale_es-ES.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_et.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_eu.json i18n: update of translations from Codeberg Translate 2025-08-24 08:22:25 +00:00
locale_fa-IR.json chore(i18n): move some plural strings to json (#9463) 2025-09-29 09:27:50 +02:00
locale_fi-FI.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_fil.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_fr-FR.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_ga.json chore(i18n): move some plural strings to json (#9463) 2025-09-29 09:27:50 +02:00
locale_gl.json i18n: update of translations from Codeberg Translate 2025-05-26 14:12:01 +00:00
locale_he.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_hi.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_hu-HU.json chore(i18n): move some plural strings to json (#9463) 2025-09-29 09:27:50 +02:00
locale_id-ID.json i18n: update of translations from Codeberg Translate 2025-10-09 07:02:21 +00:00
locale_is-IS.json chore(i18n): migrate migration descriptions to json (#9041) 2025-08-31 08:19:19 +02:00
locale_it-IT.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_ja-JP.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_jbo.json i18n: update of translations from Codeberg Translate 2025-08-24 08:22:25 +00:00
locale_ka.json i18n: update of translations from Codeberg Translate 2025-08-24 08:22:25 +00:00
locale_kab.json i18n: update of translations from Codeberg Translate 2025-10-09 07:02:21 +00:00
locale_kmr.json i18n: update of translations from Codeberg Translate 2025-09-11 04:17:35 +00:00
locale_ko-KR.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_lt.json i18n: update of translations from Codeberg Translate 2025-03-16 06:50:16 +00:00
locale_lv-LV.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_ml-IN.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_nb_NO.json i18n: update of translations from Codeberg Translate 2025-07-11 05:58:02 +00:00
locale_nds.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_nl-NL.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_pl-PL.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_pt-BR.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_pt-PT.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_ro.json i18n: update of translations from Codeberg Translate 2025-08-24 08:22:25 +00:00
locale_ru-RU.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_si-LK.json chore(i18n): move some plural strings to json (#9463) 2025-09-29 09:27:50 +02:00
locale_sk-SK.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
locale_sl.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_sr-SP.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_sv-SE.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_ta.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_th.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_tok.json i18n: update of translations from Codeberg Translate 2025-09-29 06:34:48 +00:00
locale_tr-TR.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_uk-UA.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_uz.json i18n: update of translations from Codeberg Translate 2025-10-15 09:09:35 +00:00
locale_vi.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_yi.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_zh-CN.json i18n: update of translations from Codeberg Translate 2025-11-16 04:38:49 +00:00
locale_zh-HK.json i18n: update of translations from Codeberg Translate 2025-07-11 05:58:02 +00:00
locale_zh-TW.json feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00