Refactor Cron and merge dashboard tasks (#10745)

* Refactor Cron and merge dashboard tasks

* Merge Cron and Dashboard tasks
* Make every cron task report a system notice on completion
* Refactor the creation of these tasks
* Ensure that execution counts of tasks is correct
* Allow cron tasks to be started from the cron page

* golangci-lint fixes

* Enforce that only one task with the same name can be registered

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix name check

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @guillep2k

* as per @lafriks

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add git.CommandContext variants

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
zeripath 2020-05-17 00:31:38 +01:00 committed by GitHub
parent c18144086f
commit 9a2e47b23a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 851 additions and 453 deletions

View file

@ -1842,26 +1842,37 @@ dashboard.operation_switch = Switch
dashboard.operation_run = Run
dashboard.clean_unbind_oauth = Clean unbound OAuth connections
dashboard.clean_unbind_oauth_success = All unbound OAuth connections have been deleted.
dashboard.delete_inactivate_accounts = Delete all unactivated accounts
dashboard.delete_inactivate_accounts_success = All unactivated accounts have been deleted.
dashboard.task.started=Started Task: %s
dashboard.task.process=Task: %s
dashboard.task.cancelled=Task: %s cancelled: %[3]s
dashboard.task.error=Error in Task: %s: %[3]s
dashboard.task.finished=Task: %s started by %s has finished
dashboard.task.unknown=Unknown task: %s
dashboard.cron.started=Started Cron: %[1]s
dashboard.cron.process=Cron: %[1]s
dashboard.cron.cancelled=Cron: %s cancelled: %[3]s
dashboard.cron.error=Error in Cron: %s: %[3]s
dashboard.cron.finished=Cron: %[1]s has finished
dashboard.delete_inactive_accounts = Delete all unactivated accounts
dashboard.delete_inactive_accounts.started = Delete all unactivated accounts task started.
dashboard.delete_repo_archives = Delete all repository archives
dashboard.delete_repo_archives_success = All repository archives have been deleted.
dashboard.delete_repo_archives.started = Delete all repository archives task started.
dashboard.delete_missing_repos = Delete all repositories missing their Git files
dashboard.delete_missing_repos_success = All repositories missing their Git files have been deleted.
dashboard.delete_missing_repos.started = Delete all repositories missing their Git files task started.
dashboard.delete_generated_repository_avatars = Delete generated repository avatars
dashboard.delete_generated_repository_avatars_success = Generated repository avatars were deleted.
dashboard.update_mirrors = Update Mirrors
dashboard.repo_health_check = Health check all repositories
dashboard.check_repo_stats = Check all repository statistics
dashboard.archive_cleanup = Delete old repository archives
dashboard.deleted_branches_cleanup = Clean-up deleted branches
dashboard.update_migration_poster_id = Update migration poster IDs
dashboard.git_gc_repos = Garbage collect all repositories
dashboard.git_gc_repos_success = All repositories have finished garbage collection.
dashboard.resync_all_sshkeys = Update the '.ssh/authorized_keys' file with Gitea SSH keys. (Not needed for the built-in SSH server.)
dashboard.resync_all_sshkeys_success = The public SSH keys controlled by Gitea have been updated.
dashboard.resync_all_sshkeys = Update the '.ssh/authorized_keys' file with Gitea SSH keys.
dashboard.resync_all_sshkeys.desc = (Not needed for the built-in SSH server.)
dashboard.resync_all_hooks = Resynchronize pre-receive, update and post-receive hooks of all repositories.
dashboard.resync_all_hooks_success = All pre-receive, update and post-receive repository hooks have been resynchronized.
dashboard.reinit_missing_repos = Reinitialize all missing Git repositories for which records exist
dashboard.reinit_missing_repos_success = All missing Git repositories for which records existed have been reinitialized.
dashboard.sync_external_users = Synchronize external user data
dashboard.sync_external_users_started = External user data synchronization has started.
dashboard.git_fsck = Execute health checks on all repositories
dashboard.git_fsck_started = Repository health checks have started.
dashboard.server_uptime = Server Uptime
dashboard.current_goroutine = Current Goroutines
dashboard.current_memory_usage = Current Memory Usage
@ -2266,6 +2277,7 @@ notices.delete_selected = Delete Selected
notices.delete_all = Delete All Notices
notices.type = Type
notices.type_1 = Repository
notices.type_2 = Task
notices.desc = Description
notices.op = Op.
notices.delete_success = The system notices have been deleted.