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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
853d4cde
Commit
853d4cde
authored
Mar 08, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: simulation activty priority changed
parent
c3ecc095
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Base_reindexAndSenseAlarm.py
...em/portal_skins/slapos_cloud/Base_reindexAndSenseAlarm.py
+5
-2
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Base_reindexAndSenseAlarm.py
View file @
853d4cde
portal
=
context
.
getPortalObject
()
alarm_tool
=
portal
.
portal_alarms
# Higher than simulable movement priority
PRIORITY
=
4
if
alarm_tool
.
isSubscribed
()
and
len
(
alarm_id_list
):
# No alarm tool is not subscribed, respect this choice and do not activate any alarm
...
...
@@ -23,7 +26,7 @@ if alarm_tool.isSubscribed() and len(alarm_id_list):
must_reindex_context
=
False
)
elif
alarm
.
isActive
():
activate_kw
=
{}
activate_kw
[
'priority'
]
=
3
activate_kw
[
'priority'
]
=
PRIORITY
activate_kw
[
'after_path_and_method_id'
]
=
(
alarm
.
getPath
(),
'getId'
)
# Wait for the previous alarm run to be finished
# call on alarm tool to gather and drop with sqldict
...
...
@@ -36,6 +39,6 @@ if alarm_tool.isSubscribed() and len(alarm_id_list):
# wait for the context to be reindexed before activating the alarm
# ROMAIN: getId is used, because most alarm script ends with an getId activity
# priority=3, to be executed after all reindex, but also execute simulation _expand
alarm
.
activate
(
priority
=
3
).
activeSense
()
alarm
.
activate
(
priority
=
PRIORITY
).
activeSense
()
# Prevent 2 nodes to call activateSense concurrently
alarm
.
serialize
()
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