MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / saveSubscriptionStatus

Method saveSubscriptionStatus

sqlchain/observer/service.go:226–239  ·  view source on GitHub ↗
(dbID proto.DatabaseID, count int32)

Source from the content-addressed store, hash-verified

224}
225
226func (s *Service) saveSubscriptionStatus(dbID proto.DatabaseID, count int32) (err error) {
227 log.WithFields(log.Fields{}).Debug("save subscription status")
228
229 if atomic.LoadInt32(&s.stopped) == 1 {
230 // stopped
231 return ErrStopped
232 }
233
234 _, err = s.db.Writer().Exec(saveSubscriptionSQL, string(dbID), count)
235 if err != nil {
236 err = errors.Wrapf(err, "save subscription failed: %s, %d", dbID, count)
237 }
238 return
239}
240
241func (s *Service) addAck(dbID proto.DatabaseID, height int32, offset int32, ack *types.SignedAckHeader) (err error) {
242 log.WithFields(log.Fields{

Callers 2

pullMethod · 0.80
startMethod · 0.80

Calls 4

WithFieldsFunction · 0.92
DebugMethod · 0.80
ExecMethod · 0.65
WriterMethod · 0.65

Tested by

no test coverage detected