Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
satella
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
satella
Commits
08b5abca
Commit
08b5abca
authored
4 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
changed semantics of wrap_future, docs fix
parent
117b4f30
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+2
-1
2 additions, 1 deletion
CHANGELOG.md
docs/instrumentation/metrics.rst
+2
-1
2 additions, 1 deletion
docs/instrumentation/metrics.rst
satella/__init__.py
+1
-1
1 addition, 1 deletion
satella/__init__.py
satella/cassandra/future.py
+4
-3
4 additions, 3 deletions
satella/cassandra/future.py
with
9 additions
and
6 deletions
CHANGELOG.md
+
2
−
1
View file @
08b5abca
# v2.1
5.8
# v2.1
6
*
changed semantics of
`wrap_future`
This diff is collapsed.
Click to expand it.
docs/instrumentation/metrics.rst
+
2
−
1
View file @
08b5abca
...
@@ -242,7 +242,8 @@ Useful data structures
...
@@ -242,7 +242,8 @@ Useful data structures
Sometimes you want to have some data structures with metrics about themselves.
Sometimes you want to have some data structures with metrics about themselves.
Here go they:
Here go they:
.. autoclass:: satella.instrumentation.metrics.structures.MetrifiedThreadPool
.. autoclass:: satella.instrumentation.metrics.structures.MetrifiedThreadPoolExecutor
:members:
.. autoclass:: satella.instrumentation.metrics.structures.MetrifiedCacheDict
.. autoclass:: satella.instrumentation.metrics.structures.MetrifiedCacheDict
...
...
This diff is collapsed.
Click to expand it.
satella/__init__.py
+
1
−
1
View file @
08b5abca
__version__
=
'
2.1
5.8
a1
'
__version__
=
'
2.1
6
a1
'
This diff is collapsed.
Click to expand it.
satella/cassandra/future.py
+
4
−
3
View file @
08b5abca
...
@@ -6,14 +6,15 @@ from .common import ResponseFuture
...
@@ -6,14 +6,15 @@ from .common import ResponseFuture
def
wrap_future
(
future
:
ResponseFuture
)
->
Future
:
def
wrap_future
(
future
:
ResponseFuture
)
->
Future
:
"""
"""
Convert a Cassandra
'
s future to a normal Python future.
Convert a Cassandra
'
s future to a normal Python future.
The future is returned already
The returned future will be marked as running.
future is returned when it
'
s already a Python future.
:param future: cassandra future to wrap
:param future: cassandra future to wrap
:return: a standard Python future
:return: a standard Python future
:raises TypeError: when a normal Python future is passed as future
"""
"""
if
isinstance
(
future
,
Future
):
if
isinstance
(
future
,
Future
):
r
aise
TypeError
(
'
Tried to wrap an existing F
uture
!
'
)
r
eturn
f
uture
fut
=
Future
()
fut
=
Future
()
fut
.
set_running_or_notify_cancel
()
fut
.
set_running_or_notify_cancel
()
...
...
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