diff options
author | Julio Capote <jcapote@gmail.com> | 2022-12-29 16:43:54 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2022-12-29 16:43:54 +0000 |
commit | 5a990719a02f4fd33817a2188be17b3b50498b49 (patch) | |
tree | 24c4c67c03a056004b9145f62418fae0978196fe /resources | |
parent | 2408a50c46afad193e89f9381eb999cb5e8facab (diff) | |
download | communique-5a990719a02f4fd33817a2188be17b3b50498b49.tar.gz |
builds?
Diffstat (limited to 'resources')
-rw-r--r-- | resources/outbox.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/resources/outbox.go b/resources/outbox.go index 93bed92..e7004c4 100644 --- a/resources/outbox.go +++ b/resources/outbox.go @@ -84,20 +84,20 @@ func RenderOutbox(name, domain string, db *badger.DB) (map[string]interface{}, e oc.SetJSONLDId(idProp) var i int - err = db.View(func(txn *badger.Txn) error { - opts := badger.DefaultIteratorOptions - opts.PrefetchValues = false - it := txn.NewIterator(opts) - defer it.Close() - prefix := []byte("outbox:sample") // TODO - for it.Seek(prefix); it.ValidForPrefix(prefix); it.Next() { - i++ - } - return nil - }) - if err != nil { - return nil, err - } + // err = db.View(func(txn *badger.Txn) error { + // opts := badger.DefaultIteratorOptions + // opts.PrefetchValues = false + // it := txn.NewIterator(opts) + // defer it.Close() + // prefix := []byte("outbox:sample") // TODO + // for it.Seek(prefix); it.ValidForPrefix(prefix); it.Next() { + // i++ + // } + // return nil + // }) + // if err != nil { + // return nil, err + // } itemsProp := streams.NewActivityStreamsTotalItemsProperty() itemsProp.Set(i) |