Replace standard log with logrus import
This commit is contained in:
parent
bc8b7a101c
commit
c8aa3dc275
@ -16,10 +16,10 @@ package bite
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type BiteRepository struct {
|
||||
@ -40,7 +40,7 @@ func (repository BiteRepository) Create(headerID int64, models []interface{}) er
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, BiteModel{})
|
||||
}
|
||||
@ -53,7 +53,7 @@ func (repository BiteRepository) Create(headerID int64, models []interface{}) er
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -63,7 +63,7 @@ func (repository BiteRepository) Create(headerID int64, models []interface{}) er
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package chop_lump
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type CatFileChopLumpRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository CatFileChopLumpRepository) Create(headerID int64, models []inte
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, CatFileChopLumpModel{})
|
||||
}
|
||||
@ -50,7 +50,7 @@ func (repository CatFileChopLumpRepository) Create(headerID int64, models []inte
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -60,7 +60,7 @@ func (repository CatFileChopLumpRepository) Create(headerID int64, models []inte
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package flip
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type CatFileFlipRepository struct {
|
||||
@ -36,7 +36,7 @@ func (repository CatFileFlipRepository) Create(headerID int64, models []interfac
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, CatFileFlipModel{})
|
||||
}
|
||||
@ -49,7 +49,7 @@ func (repository CatFileFlipRepository) Create(headerID int64, models []interfac
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -59,7 +59,7 @@ func (repository CatFileFlipRepository) Create(headerID int64, models []interfac
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package pit_vow
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type CatFilePitVowRepository struct {
|
||||
@ -36,7 +36,7 @@ func (repository CatFilePitVowRepository) Create(headerID int64, models []interf
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, CatFilePitVowModel{})
|
||||
}
|
||||
@ -49,7 +49,7 @@ func (repository CatFilePitVowRepository) Create(headerID int64, models []interf
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -59,7 +59,7 @@ func (repository CatFilePitVowRepository) Create(headerID int64, models []interf
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package deal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type DealRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository DealRepository) Create(headerID int64, models []interface{}) er
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, DealModel{})
|
||||
}
|
||||
@ -50,7 +50,7 @@ func (repository DealRepository) Create(headerID int64, models []interface{}) er
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -60,7 +60,7 @@ func (repository DealRepository) Create(headerID int64, models []interface{}) er
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package dent
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type DentRepository struct {
|
||||
@ -32,9 +32,9 @@ func (repository DentRepository) Create(headerID int64, models []interface{}) er
|
||||
return dBaseErr
|
||||
}
|
||||
|
||||
tic, gettTicErr := shared.GetTicInTx(headerID, tx)
|
||||
if gettTicErr != nil {
|
||||
return gettTicErr
|
||||
tic, getTicErr := shared.GetTicInTx(headerID, tx)
|
||||
if getTicErr != nil {
|
||||
return getTicErr
|
||||
}
|
||||
|
||||
for _, model := range models {
|
||||
@ -42,7 +42,7 @@ func (repository DentRepository) Create(headerID int64, models []interface{}) er
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, DentModel{})
|
||||
}
|
||||
@ -55,7 +55,7 @@ func (repository DentRepository) Create(headerID int64, models []interface{}) er
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -65,7 +65,7 @@ func (repository DentRepository) Create(headerID int64, models []interface{}) er
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package drip_drip
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type DripDripRepository struct {
|
||||
@ -36,7 +36,7 @@ func (repository DripDripRepository) Create(headerID int64, models []interface{}
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, DripDripModel{})
|
||||
}
|
||||
@ -49,7 +49,7 @@ func (repository DripDripRepository) Create(headerID int64, models []interface{}
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -59,7 +59,7 @@ func (repository DripDripRepository) Create(headerID int64, models []interface{}
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package ilk
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type DripFileIlkRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository DripFileIlkRepository) Create(headerID int64, models []interfac
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, DripFileIlkModel{})
|
||||
}
|
||||
@ -51,7 +51,7 @@ func (repository DripFileIlkRepository) Create(headerID int64, models []interfac
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -61,7 +61,7 @@ func (repository DripFileIlkRepository) Create(headerID int64, models []interfac
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package repo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type DripFileRepoRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository DripFileRepoRepository) Create(headerID int64, models []interfa
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, DripFileRepoModel{})
|
||||
}
|
||||
@ -51,7 +51,7 @@ func (repository DripFileRepoRepository) Create(headerID int64, models []interfa
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -61,7 +61,7 @@ func (repository DripFileRepoRepository) Create(headerID int64, models []interfa
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package vow
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type DripFileVowRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository DripFileVowRepository) Create(headerID int64, models []interfac
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, DripFileVowModel{})
|
||||
}
|
||||
@ -50,7 +50,7 @@ func (repository DripFileVowRepository) Create(headerID int64, models []interfac
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -60,7 +60,7 @@ func (repository DripFileVowRepository) Create(headerID int64, models []interfac
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package flap_kick
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type FlapKickRepository struct {
|
||||
@ -45,7 +45,7 @@ func (repository *FlapKickRepository) Create(headerID int64, models []interface{
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -55,7 +55,7 @@ func (repository *FlapKickRepository) Create(headerID int64, models []interface{
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ package flip_kick
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
@ -46,7 +46,7 @@ func (repository FlipKickRepository) Create(headerID int64, models []interface{}
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -55,7 +55,7 @@ func (repository FlipKickRepository) Create(headerID int64, models []interface{}
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package flop_kick
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type FlopKickRepository struct {
|
||||
@ -46,7 +46,7 @@ func (repository FlopKickRepository) Create(headerID int64, models []interface{}
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -56,7 +56,7 @@ func (repository FlopKickRepository) Create(headerID int64, models []interface{}
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ package frob
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
@ -37,7 +37,7 @@ func (repository FrobRepository) Create(headerID int64, models []interface{}) er
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, FrobModel{})
|
||||
}
|
||||
@ -48,7 +48,7 @@ func (repository FrobRepository) Create(headerID int64, models []interface{}) er
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -57,7 +57,7 @@ func (repository FrobRepository) Create(headerID int64, models []interface{}) er
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package debt_ceiling
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type PitFileDebtCeilingRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository PitFileDebtCeilingRepository) Create(headerID int64, models []i
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, PitFileDebtCeilingModel{})
|
||||
}
|
||||
@ -51,7 +51,7 @@ func (repository PitFileDebtCeilingRepository) Create(headerID int64, models []i
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -61,7 +61,7 @@ func (repository PitFileDebtCeilingRepository) Create(headerID int64, models []i
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package ilk
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type PitFileIlkRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository PitFileIlkRepository) Create(headerID int64, models []interface
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, PitFileIlkModel{})
|
||||
}
|
||||
@ -50,7 +50,7 @@ func (repository PitFileIlkRepository) Create(headerID int64, models []interface
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -60,7 +60,7 @@ func (repository PitFileIlkRepository) Create(headerID int64, models []interface
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package price_feeds
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type PriceFeedRepository struct {
|
||||
@ -36,7 +36,7 @@ func (repository PriceFeedRepository) Create(headerID int64, models []interface{
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, PriceFeedModel{})
|
||||
}
|
||||
@ -46,7 +46,7 @@ func (repository PriceFeedRepository) Create(headerID int64, models []interface{
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -56,7 +56,7 @@ func (repository PriceFeedRepository) Create(headerID int64, models []interface{
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package tend
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type TendRepository struct {
|
||||
@ -42,7 +42,7 @@ func (repository TendRepository) Create(headerID int64, models []interface{}) er
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, TendModel{})
|
||||
}
|
||||
@ -56,7 +56,7 @@ func (repository TendRepository) Create(headerID int64, models []interface{}) er
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -66,7 +66,7 @@ func (repository TendRepository) Create(headerID int64, models []interface{}) er
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package vat_flux
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type VatFluxRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository VatFluxRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VatFluxModel{})
|
||||
}
|
||||
@ -48,7 +48,7 @@ func (repository VatFluxRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -58,7 +58,7 @@ func (repository VatFluxRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ package vat_fold
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
@ -37,7 +37,7 @@ func (repository VatFoldRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VatFoldModel{})
|
||||
}
|
||||
@ -50,7 +50,7 @@ func (repository VatFoldRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -60,7 +60,7 @@ func (repository VatFoldRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package vat_grab
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
@ -23,7 +23,7 @@ func (repository VatGrabRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VatGrabModel{})
|
||||
}
|
||||
@ -36,7 +36,7 @@ func (repository VatGrabRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -45,7 +45,7 @@ func (repository VatGrabRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ package vat_heal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
@ -42,7 +42,7 @@ func (repository VatHealRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VatHealModel{})
|
||||
}
|
||||
@ -53,7 +53,7 @@ func (repository VatHealRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -63,7 +63,7 @@ func (repository VatHealRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package vat_init
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type VatInitRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository VatInitRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VatInitModel{})
|
||||
}
|
||||
@ -50,7 +50,7 @@ func (repository VatInitRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -60,7 +60,7 @@ func (repository VatInitRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package vat_move
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type VatMoveRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository VatMoveRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VatMoveModel{})
|
||||
}
|
||||
@ -51,7 +51,7 @@ func (repository VatMoveRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -61,7 +61,7 @@ func (repository VatMoveRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -2,10 +2,10 @@ package vat_slip
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type VatSlipRepository struct {
|
||||
@ -22,7 +22,7 @@ func (repository VatSlipRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VatSlipModel{})
|
||||
}
|
||||
@ -35,7 +35,7 @@ func (repository VatSlipRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -45,7 +45,7 @@ func (repository VatSlipRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -2,10 +2,10 @@ package vat_toll
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type VatTollRepository struct {
|
||||
@ -22,7 +22,7 @@ func (repository VatTollRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VatTollModel{})
|
||||
}
|
||||
@ -35,7 +35,7 @@ func (repository VatTollRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -45,7 +45,7 @@ func (repository VatTollRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -2,10 +2,10 @@ package vat_tune
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type VatTuneRepository struct {
|
||||
@ -22,7 +22,7 @@ func (repository VatTuneRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VatTuneModel{})
|
||||
}
|
||||
@ -35,7 +35,7 @@ func (repository VatTuneRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -45,7 +45,7 @@ func (repository VatTuneRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ package vow_flog
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
"log"
|
||||
)
|
||||
|
||||
type VowFlogRepository struct {
|
||||
@ -37,7 +37,7 @@ func (repository VowFlogRepository) Create(headerID int64, models []interface{})
|
||||
if !ok {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return fmt.Errorf("model of type %T, not %T", model, VowFlogModel{})
|
||||
}
|
||||
@ -51,7 +51,7 @@ func (repository VowFlogRepository) Create(headerID int64, models []interface{})
|
||||
if execErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return execErr
|
||||
}
|
||||
@ -61,7 +61,7 @@ func (repository VowFlogRepository) Create(headerID int64, models []interface{})
|
||||
if checkHeaderErr != nil {
|
||||
rollbackErr := tx.Rollback()
|
||||
if rollbackErr != nil {
|
||||
log.Println("failed to rollback ", rollbackErr)
|
||||
log.Error("failed to rollback ", rollbackErr)
|
||||
}
|
||||
return checkHeaderErr
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user