fix store context issues

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-09-17 15:41:49 +03:00
parent 6021edc855
commit 7e3fac8937
6 changed files with 33 additions and 34 deletions

View File

@@ -50,7 +50,7 @@ func (c *syncStore) processQueue(index int) {
nr.Expiry = time.Until(ir.expiresAt)
}
// Todo = internal queue also has to hold the corresponding store.WriteOptions
if err := c.syncOpts.Stores[index+1].Write(nr); err != nil {
if err := c.syncOpts.Stores[index+1].Write(c.storeOpts.Context, nr); err != nil {
// some error, so queue for retry and bail
q.PushBack(ir)
return