Commit 65e6b333 authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_upgrader: no need to call activeSense in activities in Alarm_runFullUpgrader

parent 82359189
...@@ -15,27 +15,39 @@ post_upgrade_tag = '%s-postupgrade' % tag ...@@ -15,27 +15,39 @@ post_upgrade_tag = '%s-postupgrade' % tag
active_process = context.newActiveProcess() active_process = context.newActiveProcess()
portal_alarms.upgrader_check_pre_upgrade.activate( portal_alarms.upgrader_check_pre_upgrade.activeSense(
activity='SQLQueue', activity='SQLQueue',
tag=pre_upgrade_tag, fixit=fixit,
).activeSense(fixit=fixit, params={'tag': pre_upgrade_tag}) activate_kw={
'tag': pre_upgrade_tag,
},
params={'tag': pre_upgrade_tag},
)
portal_alarms.upgrader_check_upgrader.activate( portal_alarms.upgrader_check_upgrader.activeSense(
activity='SQLQueue', activity='SQLQueue',
tag=upgrade_tag, fixit=fixit,
after_tag=pre_upgrade_tag, activate_kw={
).activeSense(fixit=fixit, params={'tag': upgrade_tag}) 'tag': upgrade_tag,
'after_tag': pre_upgrade_tag,
},
params={'tag': upgrade_tag},
)
# If we are not running the real upgrade, not need to run activeSense # If we are not running the real upgrade, not need to run activeSense
# of the post-upgrade step : post-upgrade constraints will be run on # of the post-upgrade step : post-upgrade constraints will be run on
# what are *currently* installed, and not on the result of the previous # what are *currently* installed, and not on the result of the previous
# steps, which lead to a wrong and misleading consistency check # steps, which lead to a wrong and misleading consistency check
if fixit: if fixit:
portal_alarms.upgrader_check_post_upgrade.activate( portal_alarms.upgrader_check_post_upgrade.activeSense(
activity='SQLQueue', activity='SQLQueue',
tag=post_upgrade_tag, fixit=fixit,
after_tag=upgrade_tag, activate_kw={
).activeSense(fixit=fixit, params={'tag': post_upgrade_tag}) 'tag': post_upgrade_tag,
'after_tag': upgrade_tag,
},
params={'tag': post_upgrade_tag},
)
else: else:
detail = "Post-upgrade constraints are not run as their results may differ after " detail = "Post-upgrade constraints are not run as their results may differ after "
detail += "upgrader's alarm is solved. To dry-run post-upgrade alarm, please run the pre-ugprade " detail += "upgrader's alarm is solved. To dry-run post-upgrade alarm, please run the pre-ugprade "
...@@ -49,7 +61,7 @@ else: ...@@ -49,7 +61,7 @@ else:
# start another activity to collect the results from each upgrader step # start another activity to collect the results from each upgrader step
context.activate(after_tag=post_upgrade_tag).Alarm_postFullUpgradeNeed( context.activate(after_tag=(upgrade_tag, post_upgrade_tag)).Alarm_postFullUpgradeNeed(
active_process=active_process.getRelativeUrl()) active_process=active_process.getRelativeUrl())
# Nothing else to do, so we can disable. # Nothing else to do, so we can disable.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment