MCPcopy Create free account
hub / github.com/RTradeLtd/Lens / stop

Method stop

engine/queue/queue.go:153–172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151}
152
153func (q *Queue) stop() {
154 q.smux.Lock()
155
156 q.l.Infow("executing close",
157 "items", q.pending)
158 var now = time.Now()
159 if err := q.flushFunc(q.pendingItems); err != nil {
160 q.l.Errorw("unable to flush", "error", err)
161 }
162 if err := q.closeFunc(); err != nil {
163 q.l.Errorw("error occured on close", "error", err)
164 }
165 q.l.Infow("queue and index closed",
166 "duration", time.Since(now))
167
168 // prevent further entries
169 q.stopped = true
170
171 q.smux.Unlock()
172}

Callers 1

RunMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected