move implementations to external repos (#17)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-08-25 13:44:41 +03:00
committed by GitHub
parent c4a303190a
commit 0f4b1435d9
238 changed files with 151 additions and 37364 deletions

View File

@@ -1,9 +1,9 @@
package sync
import (
"fmt"
"time"
"github.com/pkg/errors"
"github.com/unistack-org/micro/v3/store"
)
@@ -32,11 +32,11 @@ func (c *syncStore) processQueue(index int) {
for i := 0; i < q.Len(); i++ {
r, ok := q.PopFront()
if !ok {
panic(errors.Errorf("retrieved an invalid value from the L%d sync queue", index+1))
panic(fmt.Errorf("retrieved an invalid value from the L%d sync queue", index+1))
}
ir, ok := r.(*internalRecord)
if !ok {
panic(errors.Errorf("retrieved a non-internal record from the L%d sync queue", index+1))
panic(fmt.Errorf("retrieved a non-internal record from the L%d sync queue", index+1))
}
if !ir.expiresAt.IsZero() && time.Now().After(ir.expiresAt) {
continue