Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
ska-logging
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
LOFAR2.0
ska-logging
Commits
fc5a9bb5
Unverified
Commit
fc5a9bb5
authored
4 years ago
by
Katleho Madisa
Browse files
Options
Downloads
Patches
Plain Diff
SAR-149
Updated docstrings.
parent
07f4ac46
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ska/logging/transactions.py
+4
-2
4 additions, 2 deletions
src/ska/logging/transactions.py
with
4 additions
and
2 deletions
src/ska/logging/transactions.py
+
4
−
2
View file @
fc5a9bb5
...
@@ -73,6 +73,9 @@ class Transaction:
...
@@ -73,6 +73,9 @@ class Transaction:
If there is a transaction ID in `params` and `transaction_id` is also passed in
If there is a transaction ID in `params` and `transaction_id` is also passed in
then the passed in `transaction_id` will take precedence.
then the passed in `transaction_id` will take precedence.
However, if both transaction IDs provided in `params` and `transaction_id` are deemed
invalid (not a string or an empty string), then a new transaction ID will be generated.
By default the key `transaction_id` will be used to get a transaction ID out of
By default the key `transaction_id` will be used to get a transaction ID out of
`params`. If a different key is required then `transaction_id_key` can be
`params`. If a different key is required then `transaction_id_key` can be
specified.
specified.
...
@@ -96,12 +99,11 @@ class Transaction:
...
@@ -96,12 +99,11 @@ class Transaction:
Raises
Raises
------
------
TransactionParamsError
TransactionParamsError
If the `params` passed
in
is not valid.
If the `params` passed is not valid.
"""
"""
if
not
isinstance
(
params
,
Mapping
):
if
not
isinstance
(
params
,
Mapping
):
raise
TransactionParamsError
(
"
params must be dict-like (Mapping)
"
)
raise
TransactionParamsError
(
"
params must be dict-like (Mapping)
"
)
if
logger
:
if
logger
:
self
.
logger
=
logger
self
.
logger
=
logger
else
:
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment