all database operations now take a context.Context, which is propagated through from sources

This commit is contained in:
2025-12-20 22:29:26 -07:00
parent 9e6bf2feda
commit 5c8bb8dd5e
39 changed files with 605 additions and 504 deletions
+4 -3
View File
@@ -10,6 +10,7 @@
package database
import (
"context"
"errors"
"fmt"
"math"
@@ -32,9 +33,9 @@ func (d *PostLinkData) NeedsDBVerification() bool {
}
// VerifyNames verifies the post link data against the database.
func (d *PostLinkData) VerifyNames() error {
func (d *PostLinkData) VerifyNames(ctx context.Context) error {
if d.Community != "" {
comm, err := AmGetCommunityByAlias(d.Community)
comm, err := AmGetCommunityByAlias(ctx, d.Community)
if err != nil {
return err
}
@@ -43,7 +44,7 @@ func (d *PostLinkData) VerifyNames() error {
}
}
if d.Conference != "" {
conf, err := AmGetConferenceByAlias(d.Conference)
conf, err := AmGetConferenceByAlias(ctx, d.Conference)
if err != nil {
return err
}