Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
AlekSIS®
Official
AlekSIS-Core
Commits
a4538635
Verified
Commit
a4538635
authored
3 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Fix backup calculation
parent
c6c2c474
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!658
Resolve "Backup health check broken due to missing mathematical knowledge"
Pipeline
#16384
canceled
3 years ago
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/health_checks.py
+3
-3
3 additions, 3 deletions
aleksis/core/health_checks.py
with
3 additions
and
3 deletions
aleksis/core/health_checks.py
+
3
−
3
View file @
a4538635
...
...
@@ -38,9 +38,9 @@ class BaseBackupHealthCheck(BaseHealthCheckBackend):
self
.
add_error
(
_
(
"
The backup folder doesn
'
t exist.
"
))
return
if
backups
:
last_backup
=
backups
[
-
1
]
last_backup_time
=
dbbackup_utils
.
filename_to_date
(
last_backup
)
time_gone_since_backup
=
last_backup_time
-
datetime
.
now
()
last_backup
=
backups
[
:
1
]
last_backup_time
=
dbbackup_utils
.
filename_to_date
(
last_backup
[
0
]
)
time_gone_since_backup
=
datetime
.
now
()
-
last_backup_time
# Check if backup is older than configured time
if
time_gone_since_backup
.
seconds
>
self
.
configured_seconds
:
...
...
This diff is collapsed.
Click to expand it.
Tom Teichler
@debdolph
mentioned in commit
a2266de9
·
3 years ago
mentioned in commit
a2266de9
mentioned in commit a2266de90dc86bd2b80168d7983ad7897691e2dc
Toggle commit list
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