Reduce ctx timeout duration

This commit is contained in:
Neeraj Gupta
2024-08-12 21:37:35 +05:30
committed by Neeraj Gupta
parent ff72590958
commit 6fc24f6900

View File

@@ -58,7 +58,7 @@ func (c *Controller) replicate(i int) {
func (c *Controller) tryReplicate() error {
newLockTime := enteTime.MicrosecondsAfterMinutes(60)
ctx, cancelFun := context.WithTimeout(context.Background(), 50*time.Minute)
ctx, cancelFun := context.WithTimeout(context.Background(), 20*time.Minute)
defer cancelFun()
row, err := c.Repo.GetPendingSyncDataAndExtendLock(ctx, newLockTime, false)
if err != nil {