24 lines
972 B
Go
24 lines
972 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
// DBQueueLog is a model used to store metrics and information about a conversation's consumption within a queue.
|
|
// - Queue is the name of the queue that processed the conversation.
|
|
// - Start is the time that the queue consumer started processing the conversation.
|
|
// - End is the time that the queue consumer finished processing the conversation.
|
|
// - NextQueue is the name of the queue that the consumer attempted to forward the conversation ID into.
|
|
// - Result is a map of metadata about the conversation's time in the consumer, including any potential error messages.
|
|
type DBQueueLog struct {
|
|
Queue string `gorm:"primaryKey"`
|
|
ConversationId string `gorm:"primaryKey"`
|
|
Start time.Time `gorm:"index"`
|
|
End time.Time `gorm:"index"`
|
|
Duration float64
|
|
NextQueue string
|
|
Result string `gorm:"type:json"`
|
|
}
|
|
|
|
func (DBQueueLog) TableName() string {
|
|
return "gc_queue_logs"
|
|
}
|