Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
slapos.core
Commits
3ce6be64
Commit
3ce6be64
authored
Jan 16, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Properly) Don't force-process a stopped instance.
parent
11e9955d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+8
-4
No files found.
slapos/grid/slapgrid.py
View file @
3ce6be64
...
...
@@ -745,11 +745,11 @@ class Slapgrid(object):
# Try to process it anyway, it may need to be deleted.
software_path
=
None
periodicity
=
self
.
maximum_periodicity
if
software_path
:
# Get periodicity from periodicity file if not forced
periodicity
=
self
.
maximum_periodicity
if
not
self
.
force_periodicity
:
periodicity_path
=
os
.
path
.
join
(
software_path
,
'periodicity'
)
periodicity_path
=
os
.
path
.
join
(
software_path
,
'periodicity'
)
if
os
.
path
.
exists
(
periodicity_path
):
try
:
periodicity
=
int
(
open
(
periodicity_path
).
read
())
...
...
@@ -768,8 +768,12 @@ class Slapgrid(object):
if
timestamp
:
try
:
if
int
(
timestamp
)
<=
int
(
old_timestamp
):
if
int
(
time
.
time
())
<=
(
last_runtime
+
periodicity
)
:
# Check periodicity, i.e if periodicity is one day, partition
# should be processed at least every day.
# Only do it for "started" instances
if
computer_partition
.
getState
()
!=
COMPUTER_PARTITION_STARTED_STATE
:
return
if
int
(
time
.
time
())
<=
(
last_runtime
+
periodicity
):
self
.
logger
.
info
(
'Partition already up-to-date, skipping.'
)
return
except
ValueError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment