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
170a719c
Commit
170a719c
authored
4 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
v2.17.10
parent
3e8b0f48
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
satella/__init__.py
+1
-1
1 addition, 1 deletion
satella/__init__.py
satella/time/measure.py
+5
-1
5 additions, 1 deletion
satella/time/measure.py
satella/time/misc.py
+3
-9
3 additions, 9 deletions
satella/time/misc.py
with
9 additions
and
11 deletions
satella/__init__.py
+
1
−
1
View file @
170a719c
__version__
=
'
2.17.10
a1
'
__version__
=
'
2.17.10
'
This diff is collapsed.
Click to expand it.
satella/time/measure.py
+
5
−
1
View file @
170a719c
from
..exceptions
import
WouldWaitMore
from
concurrent.futures._base
import
Future
import
typing
as
tp
import
time
import
copy
import
inspect
import
warnings
from
concurrent.futures
import
Future
from
functools
import
wraps
# import from functools to prevent circular import exception
TimeSignal
=
tp
.
Callable
[[],
float
]
...
...
This diff is collapsed.
Click to expand it.
satella/time/misc.py
+
3
−
9
View file @
170a719c
import
copy
import
inspect
import
time
import
typing
as
tp
import
warnings
from
concurrent.futures
import
Future
from
functools
import
wraps
# import from functools to prevent circular import exception
__all__
=
[
'
measure
'
,
'
time_as_int
'
,
'
time_ms
'
,
'
sleep
'
,
'
time_us
'
,
'
ExponentialBackoff
'
,
'
parse_time_string
'
]
__all__
=
[
'
time_as_int
'
,
'
time_ms
'
,
'
sleep
'
,
'
time_us
'
,
'
ExponentialBackoff
'
]
from
satella.coding.concurrent.thread
import
Condition
from
satella.exceptions
import
WouldWaitMore
from
.parse
import
parse_time_string
from
.measure
import
measure
def
sleep
(
y
:
tp
.
Union
[
str
,
float
],
abort_on_interrupt
:
bool
=
False
)
->
bool
:
...
...
@@ -141,8 +137,6 @@ class ExponentialBackoff:
:param timeout: maximum amount of seconds to wait. If waited more than that,
WouldWaitMore will be raised
:param sleep_function: a function which will be called with a single argument,
the number of seconds to sleep. This should sleep by that many seconds.
:raises WouldWaitMore: waited for timeout and service still was not healthy
"""
with
measure
(
timeout
=
timeout
)
as
m
:
...
...
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