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
cca6753c
Commit
cca6753c
authored
Oct 05, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: no need to use a tag if context is not reindexed
parent
f8420e10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Base_reindexAndSenseAlarm.py
...em/portal_skins/slapos_cloud/Base_reindexAndSenseAlarm.py
+3
-2
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Base_reindexAndSenseAlarm.py
View file @
cca6753c
...
...
@@ -4,8 +4,9 @@ alarm_tool = portal.portal_alarms
if
alarm_tool
.
isSubscribed
()
and
len
(
alarm_id_list
):
# No alarm tool is not subscribed, respect this choice and do not activate any alarm
tag
=
"%s-%s"
%
(
script
.
id
,
context
.
getRelativeUrl
())
tag
=
None
if
must_reindex_context
:
tag
=
"%s-%s"
%
(
script
.
id
,
context
.
getRelativeUrl
())
context
.
reindexObject
(
activate_kw
=
{
'tag'
:
tag
})
for
alarm_id
in
alarm_id_list
:
...
...
@@ -15,7 +16,7 @@ if alarm_tool.isSubscribed() and len(alarm_id_list):
if
alarm
.
isActive
():
# Wait for the previous alarm run to be finished
context
.
activate
(
after_path
=
alarm
.
getPath
()).
Base_reindexAndSenseAlarm
([
alarm_id
],
must_reindex_context
=
False
)
context
.
activate
(
after_path
=
alarm
.
getPath
()
,
after_tag
=
tag
).
Base_reindexAndSenseAlarm
([
alarm_id
],
must_reindex_context
=
False
)
else
:
# wait for the context to be reindexed before activating the alarm
# ROMAIN: SQLQueue is used, because I'm not sure if SQLDict drop activities with different after_tag
...
...
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