Skip to content

Error when using transaction timeout #471

Open
@nicoskk

Description

@nicoskk

Steps to reproduce

loopback-connector-postgresql version is 5.3.0
node version is v14.1.0

await app.datasources.db.transaction(async myTxModels => {
    await customFunction(element, {
        db1: db1TxModels, 
        db2: db2Models
    }).catch(err => { throw err });

}, { timeout: 240000 });

Current Behavior

aftersome time, app crashes with the following error

tx.notifyObserversOf('timeout', context, function(err) {
           ^

TypeError: tx.notifyObserversOf is not a function
    at Timeout._onTimeout (\node_modules\loopback-connector\lib\transaction.js:124:12)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions