You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services
Giteabot 1380a46623
show manual cron run's last time (#27544) (#27577)
Backport #27544 by @earl-warren

- Currently in the cron tasks, the 'Previous Time' only displays the
previous time of when the cron library executes the function, but not
any of the manual executions of the task.
- Store the last run's time in memory in the Task struct and use that,
when that time is later than time that the cron library has executed
this task.
- This ensures that if an instance admin manually starts a task, there's
feedback that this task is/has been run, because the task might be run
that quick, that the status icon already has been changed to an
checkmark,
- Tasks that are executed at startup now reflect this as well, as the
time of the execution of that task on startup is now being shown as
'Previous Time'.
- Added integration tests for the API part, which is easier to test
because querying the HTML table of cron tasks is non-trivial.
- Resolves https://codeberg.org/forgejo/forgejo/issues/949

(cherry picked from commit fd34fdac1408ece6b7d9fe6a76501ed9a45d06fa)

Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: silverwind <me@silverwind.io>
1 year ago
..
actions Make Actions tasks/jobs timeouts configurable by the user (#27400) (#27402) 1 year ago
agit Move notification interface to services layer (#26915) 1 year ago
asymkey Another round of `db.DefaultContext` refactor (#27103) (#27262) 1 year ago
attachment move repository deletion to service layer (#26948) 1 year ago
auth Fix attachment download bug (#27486) (#27571) 1 year ago
automerge Improve queue and logger context (#24924) 2 years ago
context Another round of `db.DefaultContext` refactor (#27103) (#27262) 1 year ago
convert Fix attachment download bug (#27486) (#27571) 1 year ago
cron show manual cron run's last time (#27544) (#27577) 1 year ago
externalaccount More `db.DefaultContext` refactor (#27265) (#27347) 1 year ago
feed More `db.DefaultContext` refactor (#27265) (#27347) 1 year ago
forms Check blocklist for emails when adding them to account (#26812) 1 year ago
gitdiff Fix successful return value for `SyncAndGetUserSpecificDiff` (#27152) 1 year ago
indexer Update status and code index after changing the default branch (#27018) 1 year ago
issue Avoid run change title process when the title is same (#27467) (#27558) 1 year ago
lfs Bump github.com/golang-jwt/jwt to v5 (#25975) 2 years ago
mailer Next round of `db.DefaultContext` refactor (#27089) 1 year ago
markup Move web/api context related testing function into a separate package (#26859) 1 year ago
migrations More `db.DefaultContext` refactor (#27265) (#27347) 1 year ago
mirror More `db.DefaultContext` refactor (#27265) (#27347) 1 year ago
notify Update status and code index after changing the default branch (#27018) 1 year ago
org More refactoring of `db.DefaultContext` (#27083) 1 year ago
packages Another round of `db.DefaultContext` refactor (#27103) (#27262) 1 year ago
pull More `db.DefaultContext` refactor (#27265) (#27347) 1 year ago
release Another round of `db.DefaultContext` refactor (#27103) (#27262) 1 year ago
repository Another round of `db.DefaultContext` refactor (#27103) (#27262) 1 year ago
secrets Refactor secrets modification logic (#26873) 1 year ago
task Next round of `db.DefaultContext` refactor (#27089) 1 year ago
uinotification More `db.DefaultContext` refactor (#27265) (#27347) 1 year ago
user Another round of `db.DefaultContext` refactor (#27103) (#27262) 1 year ago
webhook Fix release URL in webhooks (#27182) (#27185) 1 year ago
wiki Fix incorrect test code for error handling (#27139) 1 year ago