Fix job fields naiming
This commit is contained in:
@@ -10,11 +10,13 @@ type TranscribeJob struct {
|
||||
FileID *string
|
||||
IsError bool
|
||||
ErrorText *string
|
||||
Worker *string
|
||||
AcquiredAt *time.Time
|
||||
CreatedAt time.Time
|
||||
AcquisitionID *string
|
||||
AcquireTime *time.Time
|
||||
DelayTime *time.Time
|
||||
RecognitionOpID *string // ID операции распознавания в Yandex Cloud
|
||||
TranscriptionText *string // Результат распознавания
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -28,6 +30,14 @@ const (
|
||||
|
||||
func (j *TranscribeJob) MoveToState(state string) {
|
||||
j.State = state
|
||||
j.Worker = nil
|
||||
j.AcquiredAt = nil
|
||||
j.DelayTime = nil
|
||||
j.AcquisitionID = nil
|
||||
j.AcquireTime = nil
|
||||
j.UpdatedAt = time.Now()
|
||||
}
|
||||
|
||||
func (j *TranscribeJob) MoveToStateAndDelay(state string, delay *time.Time) {
|
||||
j.MoveToState(state)
|
||||
j.DelayTime = delay
|
||||
j.UpdatedAt = time.Now()
|
||||
}
|
||||
|
Reference in New Issue
Block a user