Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set transaction timeout? #441

Open
DarthSonic opened this issue Apr 12, 2022 · 1 comment
Open

Set transaction timeout? #441

DarthSonic opened this issue Apr 12, 2022 · 1 comment
Assignees
Labels

Comments

@DarthSonic
Copy link

Describe the bug
I cannot see any property or method to set transaction timeout.

Versions:

  • Neo4jClient 4.1.23
  • BoltGraphClient
  • .NET Version 4.8
  • Server Version 3.5.5 & 4.4.2

Expected behaviour
Beeing able to set transaction timeout other than the default 60 seconds either in connection or for current transaction.

@DarthSonic
Copy link
Author

Also it would be great to get an property if transaction is still active or timed out:

            if (_graphClient.Tx.InTransaction)
                await _graphClient.Tx.Transaction.KeepAliveAsync();

Will throw exception on KeepAliveAsync if timed out. Better to use like:

            if (_graphClient.Tx.InTransaction && _graphClient.Tx.IsActive)
                await _graphClient.Tx.Transaction.KeepAliveAsync();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants