code: func (op *triageOp) triggeringPolicy(c context.Context, job *Job, triggers []*internal.Trigger) policy.Out {
  	var policyFunc policy.Func
  	p, err := policy.UnmarshalDefinition(job.TriggeringPolicyRaw)
  	if err == nil {
  		policyFunc, err = op.policyFactory(p)
  	}
  	if err != nil {
  		op.debugErrLog(c, err, "Failed to instantiate the triggering policy function, using the default policy instead")
  		policyFunc = policy.Default()
  	}
  	return policyFunc(policyFuncEnv{c, op}, policy.In{
  		Now:               clock.Now(c).UTC(),
  		ActiveInvocations: job.ActiveInvocations,
  		Triggers:          triggers,
  	})
  }
docs: // triggeringPolicy decides how to convert a set of pending triggers into
  // a bunch of new invocations.
  //
  // Called within a job transaction. Must not do any expensive calls.