executor

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultRetries = 10

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(db *databases.Database, batchSize int) (*Executor, error)

func (*Executor) ChangeBatchSize

func (e *Executor) ChangeBatchSize(batchSize int)

func (*Executor) ChangeRetries

func (e *Executor) ChangeRetries(r int)

func (*Executor) CreateIndexes

func (e *Executor) CreateIndexes() error

func (*Executor) DoDelivery

func (e *Executor) DoDelivery(wId int, oCarrierId int, olDeliveryD time.Time, dId int) error

todo the order of arguments here is weird also the dId passed from the worker is probably utterly wrong

func (*Executor) DoDeliveryTrx added in v0.0.2

func (e *Executor) DoDeliveryTrx(wId int, oCarrierId int, olDeliveryD time.Time, dId int) error

func (*Executor) DoNewOrder

func (e *Executor) DoNewOrder(wId, dId, cId int, oEntryD time.Time, iIds []int, iWids []int, iQtys []int) error

func (*Executor) DoNewOrderTrx added in v0.0.2

func (e *Executor) DoNewOrderTrx(wId, dId, cId int, oEntryD time.Time, iIds []int, iWids []int, iQtys []int) error

func (*Executor) DoOrderStatus

func (e *Executor) DoOrderStatus(warehouseId, districtId, cId int, cLast string) error

func (*Executor) DoOrderStatusTrx added in v0.0.2

func (e *Executor) DoOrderStatusTrx(warehouseId, districtId, cId int, cLast string) error

func (*Executor) DoPayment

func (e *Executor) DoPayment(
	warehouseId, districtId int,
	amount float64,
	cWId, cDId, cId int,
	cLast string,
	hDate time.Time,
	badCredit string,
	cdatalen int,
) error

func (*Executor) DoPaymentTrx added in v0.0.2

func (e *Executor) DoPaymentTrx(warehouseId, districtId int,
	amount float64,
	cWId, cDId, cId int,
	cLast string,
	hDate time.Time,
	badCredit string,
	cdatalen int) error

func (*Executor) DoStockLevelTrx

func (e *Executor) DoStockLevelTrx(warehouseId int, districtId int, threshold int) error

func (*Executor) DoTrxRetries added in v0.0.2

func (e *Executor) DoTrxRetries(fn func() error) error

func (*Executor) Flush

func (e *Executor) Flush(collectionName string)

func (*Executor) Save

func (e *Executor) Save(collectionName string, d interface{})

@TODO@ error handling

func (*Executor) SaveBatch

func (e *Executor) SaveBatch(collectionName string, d interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL