summaryrefslogtreecommitdiffstats
path: root/models/task.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-06-16 23:02:24 +0100
committerGitHub <noreply@github.com>2021-06-16 18:02:24 -0400
commit6d69df28047bf7fd3e307391b484a93432615b90 (patch)
tree8a24ce0727f86625c4f469b6744f6f3f2fa27c86 /models/task.go
parent047c39e91bb39d4f31278d8c4082187894ea8263 (diff)
downloadgitea-6d69df28047bf7fd3e307391b484a93432615b90.tar.gz
gitea-6d69df28047bf7fd3e307391b484a93432615b90.zip
Add Status Updates whilst Gitea migrations are occurring (#15076)
* Add migrating message Signed-off-by: Andrew Thornton <art27@cantab.net> * simplify messenger Signed-off-by: Andrew Thornton <art27@cantab.net> * make messenger an interface Signed-off-by: Andrew Thornton <art27@cantab.net> * rename Signed-off-by: Andrew Thornton <art27@cantab.net> * prepare for merge Signed-off-by: Andrew Thornton <art27@cantab.net> * as per tech Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'models/task.go')
-rw-r--r--models/task.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/models/task.go b/models/task.go
index 2743d91f66..5f9ccc6bfa 100644
--- a/models/task.go
+++ b/models/task.go
@@ -32,10 +32,16 @@ type Task struct {
StartTime timeutil.TimeStamp
EndTime timeutil.TimeStamp
PayloadContent string `xorm:"TEXT"`
- Errors string `xorm:"TEXT"` // if task failed, saved the error reason
+ Message string `xorm:"TEXT"` // if task failed, saved the error reason
Created timeutil.TimeStamp `xorm:"created"`
}
+// TranslatableMessage represents JSON struct that can be translated with a Locale
+type TranslatableMessage struct {
+ Format string
+ Args []interface{} `json:"omitempty"`
+}
+
// LoadRepo loads repository of the task
func (task *Task) LoadRepo() error {
return task.loadRepo(x)