Commit 6a22ec0b authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web_deploy: Also search for published alive pages

   This was done by Thomas, I'm just pushing it into git
parent 9c2b697c
Pipeline #17610 failed with stage
in 0 seconds
...@@ -7,15 +7,10 @@ url_map = {"deploy-Function.Common" : "function_common_content", ...@@ -7,15 +7,10 @@ url_map = {"deploy-Function.Common" : "function_common_content",
"deploy-Unstable.Channel": "slapos_unstable_content"} "deploy-Unstable.Channel": "slapos_unstable_content"}
portal = context.getPortalObject() portal = context.getPortalObject()
from DateTime import DateTime
i = DateTime()
for doc in portal.portal_catalog(reference=url_map.keys(), for doc in portal.portal_catalog(reference=url_map.keys(),
portal_type="Web Page", portal_type="Web Page",
validation_state="published"): validation_state=["published", "published_alive"]):
mapping_dict[url_map[doc.getReference()]] = doc.getTextContent() mapping_dict[url_map[doc.getReference()]] = doc.getTextContent()
context.log((DateTime() - i)*3600*24)
return mapping_dict return mapping_dict
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