Add application name to transaction
Trying to find what's getting locked
This commit is contained in:
parent
3196b73a80
commit
a6ca30fdb1
2 changed files with 3 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ import (
|
|||
"github.com/Gleipnir-Technology/nidus-sync/platform/types"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func ComplianceRequestMailerCreate(ctx context.Context, user User, site_id int32) (int32, error) {
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@ func addWaitingJobs(ctx context.Context) error {
|
|||
continue
|
||||
}
|
||||
defer txn.Rollback(ctx)
|
||||
app_name := fmt.Sprintf("restarted job %d", job.ID)
|
||||
txn.Exec(fmt.Sprintf("SET application_name = '%s'", app_name))
|
||||
err = handleJob(ctx, txn, job)
|
||||
if err != nil {
|
||||
sublog.Error().Err(err).Msg("failed handle job")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue