pernosco.py (612B)
1 # This Source Code Form is subject to the terms of the Mozilla Public 2 # License, v. 2.0. If a copy of the MPL was not distributed with this 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 5 from taskgraph.transforms.base import TransformSequence 6 7 transforms = TransformSequence() 8 9 10 @transforms.add 11 def add_pernosco_route(config, tasks): 12 try_config = config.params.get("try_task_config", {}) 13 if not try_config.get("pernosco"): 14 yield from tasks 15 return 16 17 for task in tasks: 18 task.setdefault("routes", []).append("notify.pulse.pernosco-v1.on-resolved") 19 yield task