MCPcopy
hub / github.com/gdy666/lucky / SetDomainUpdateStatus

Method SetDomainUpdateStatus

ddnscore.go/domain.go:75–91  ·  view source on GitHub ↗
(status string, message string)

Source from the content-addressed store, hash-verified

73}
74
75func (d *Domain) SetDomainUpdateStatus(status string, message string) {
76
77 if status != UpdateWaiting {
78 if status != UpdateStop || d.UpdateStatus != UpdateStop {
79 d.LastUpdateStatusTime = time.Now().Format("2006-01-02 15:04:05")
80 // 状态更新历史记录
81 hi := UpdateHistroyItem{UpdateStatus: string(status), UpdateTime: d.LastUpdateStatusTime}
82 d.UpdateHistroy = append(d.UpdateHistroy, hi)
83 if len(d.UpdateHistroy) > 10 {
84 d.UpdateHistroy = DeleteAnyListlice(d.UpdateHistroy, 0)
85 }
86 }
87 }
88 d.UpdateStatus = status
89 d.Message = message
90
91}

Callers 15

createUpdateDomainMethod · 0.45
createMethod · 0.45
modifyMethod · 0.45
createUpdateDomainMethod · 0.45
createMethod · 0.45
modifyMethod · 0.45
createUpdateDomainMethod · 0.45
createUpdateDomainMethod · 0.45
createMethod · 0.45
modifyMethod · 0.45
createUpdateDomainMethod · 0.45
createMethod · 0.45

Calls 1

DeleteAnyListliceFunction · 0.70

Tested by

no test coverage detected