79188035

Date: 2024-11-14 09:24:27
Score: 0.5
Natty:
Report link

As the solution we have overridden the playbook build (generate-site.js module). We have split the main playbook into small set of playbooks which are easy to swallow. We call them as canary playbooks.

async function buildCanaryPlaybooks(playbook, sourcesPerPb = 3) {
  let canaryPlaybooks = {};
  if(playbook.content.sources.length > sourcesPerPb){
    let sources = playbook.content.sources;
    for(let i=0,j=sources.length; i < j; i+=sourcesPerPb){
        let chunk = sources.slice(i, i+ sourcesPerPb)
        let canaryPlaybook = getNewPlaybook(playbook,chunk)
        canaryPlaybooks[i] = canaryPlaybook
    }
  }
  return canaryPlaybooks;
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Kal_331