Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZKAPAuthorizer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
ZKAPAuthorizer
Commits
61edf75e
Commit
61edf75e
authored
5 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
note for the future
parent
6a3ec530
No related branches found
Branches containing commit
No related tags found
1 merge request
!73
Automatically maintain leases
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/_zkapauthorizer/lease_maintenance.py
+6
-0
6 additions, 0 deletions
src/_zkapauthorizer/lease_maintenance.py
with
6 additions
and
0 deletions
src/_zkapauthorizer/lease_maintenance.py
+
6
−
0
View file @
61edf75e
...
...
@@ -329,6 +329,12 @@ def lease_maintenance_service(
(
interval_mean
+
halfrange
).
total_seconds
(),
),
)
# Rather than an all-or-nothing last-run time we probably eventually want
# to have a more comprehensive record of the state when we were last
# interrupted. This would remove the unfortunate behavior of restarting
# from the beginning if we shut down during a lease scan. Shutting down
# during a lease scan becomes increasingly likely the more shares there
# are to check.
last_run
=
read_time_from_path
(
last_run_path
)
if
last_run
is
None
:
initial_interval
=
sample_interval_distribution
()
...
...
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