Rework background jobs to make transactions much shorter
I ended up with minutes-long open transactions in the database in prod which was causing outtages. This is because I thought transactions were basically free, which is a terrible thing to think. Instead we'll just open them when we need them.
This commit is contained in:
parent
55cb4ca962
commit
ade629ecf5
11 changed files with 118 additions and 87 deletions
|
|
@ -8,7 +8,6 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/Gleipnir-Technology/bob"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/config"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/models"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/label-studio"
|
||||
|
|
@ -74,7 +73,7 @@ func createLabelStudioClient() (*labelstudio.Client, error) {
|
|||
func noteAudioGetLatest(ctx context.Context, uuid string) (*models.NoteAudio, error) {
|
||||
return nil, nil
|
||||
}
|
||||
func jobLabelStudioAudioCreate(ctx context.Context, txn bob.Executor, row_id int32) error {
|
||||
func jobLabelStudioAudioCreate(ctx context.Context, row_id int32) error {
|
||||
return fmt.Errorf("label studio integration has been disabled")
|
||||
/*
|
||||
customer := os.Getenv("CUSTOMER")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue