forgejo/services
Gusted daefb27d2c
[GITEA] Show manual cron run's last time
- 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 0475e2048e)
(cherry picked from commit dcc952f0db)
(cherry picked from commit 7168a240e8)
(cherry picked from commit 4bc4cccb1b)
(cherry picked from commit 3fe019ca3c)

[GITEA] Show manual cron run's last time (squash) 26 jobs in cron fixtures

(cherry picked from commit 8473030628)
(cherry picked from commit 871c729742)
2023-09-04 11:11:24 +02:00
..
actions chore(actions): support cron schedule task (#26655) 2023-08-24 03:06:51 +00:00
agit Add context parameter to some database functions (#26055) 2023-07-22 22:14:27 +08:00
asymkey Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
attachment [FEAT] allow setting the update date on issues and comments 2023-09-04 10:40:26 +02:00
auth [TESTS] oauth2: make it possible to use an alternate http.Client 2023-09-04 10:03:58 +02:00
automerge Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
context Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
convert [FEAT] add Forgero Git Service 2023-09-04 10:40:26 +02:00
cron [GITEA] Show manual cron run's last time 2023-09-04 11:11:24 +02:00
externalaccount Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
forgejo [UPGRADE] add sanity checks for [storage*] 2023-09-04 10:07:02 +02:00
forms Check blocklist for emails when adding them to account (#26812) 2023-08-30 10:46:49 -05:00
gitdiff Use Go 1.21 and update dependencies (#26878) 2023-09-03 10:34:57 +00:00
issue [FEAT] allow setting the update date on issues and comments 2023-09-04 10:40:26 +02:00
lfs Bump github.com/golang-jwt/jwt to v5 (#25975) 2023-07-19 09:57:10 +00:00
mailer Update team invitation email link (#26550) 2023-08-31 16:26:13 +00:00
markup Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00
migrations Use Set[Type] instead of map[Type]bool/struct{}. (#26804) 2023-08-30 06:55:25 +00:00
mirror Move modules/mirror to services (#26737) 2023-08-27 10:24:45 +08:00
org Refactor rename user and rename organization (#24052) 2023-05-21 23:13:47 +08:00
packages Reduce some allocations in type conversion (#26772) 2023-08-29 00:43:16 +08:00
pull Reduce some allocations in type conversion (#26772) 2023-08-29 00:43:16 +08:00
release Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
repository Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00
task Add Retry button when creating a mirror-repo fails (#26228) 2023-08-04 10:21:32 +08:00
user add unit test for user renaming (#26261) 2023-08-03 09:38:51 +08:00
webhook Modify the content format of the Feishu webhook (#25106) 2023-08-24 09:00:11 +08:00
wiki Introduce ctx.PathParamRaw to avoid incorrect unescaping (#26392) 2023-08-09 14:57:45 +08:00