Revert "fix: database lock by adding lock function when set schedule"

This reverts commit 0c784b4cc9.
This commit is contained in:
Tigor Hutasuhut 2024-06-04 00:23:13 +07:00
parent cb74b0d817
commit a5c2b337f4

View file

@ -96,7 +96,6 @@ func (api *API) PubsubStartDownloadSubreddit(ctx context.Context, params PubsubS
return errs.Wrapw(err, "failed to verify subreddit existence", "params", params)
}
api.lockf(func() {
err = api.withTransaction(ctx, func(exec bob.Executor) error {
_, err := api.scheduleSet(ctx, exec, ScheduleSetParams{
Subreddit: subreddit.Name,
@ -117,7 +116,6 @@ func (api *API) PubsubStartDownloadSubreddit(ctx context.Context, params PubsubS
}
return nil
})
})
return err
return nil
}