How to use the taskcluster-client-web.Queue function in taskcluster-client-web

To help you get started, we’ve selected a few taskcluster-client-web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / treeherder / ui / plugins / controller.js View on Github external
taskId: results.originalTaskId,
                                        task: results.originalTask,
                                        input: {},
                                        staticActionVariables: results.staticActionVariables,
                                    }).then(function () {
                                        $scope.$apply(thNotify.send(`Request sent to backfill job via actions.json (${actionTaskId})`, 'success'));
                                    }, function (e) {
                                        // The full message is too large to fit in a Treeherder
                                        // notification box.
                                        $scope.$apply(thNotify.send(formatTaskclusterError(e), 'danger', { sticky: true }));
                                    });
                                }
                            }

                            // Otherwise we'll figure things out with actions.yml
                            const queue = new Queue({ credentialAgent: thTaskcluster.getAgent() });

                            // buildUrl is documented at
                            // https://github.com/taskcluster/taskcluster-client-web#construct-urls
                            // It is necessary here because getLatestArtifact assumes it is getting back
                            // JSON as a reponse due to how the client library is constructed. Since this
                            // result is yml, we'll fetch it manually using $http and can use the url
                            // returned by this method.
                            const url = queue.buildUrl(
                                queue.getLatestArtifact,
                                decisionTaskId,
                                'public/action.yml'
                            );
                            $http.get(url).then(function (resp) {
                                let action = resp.data;
                                const template = $interpolate(action);
                                action = template({

taskcluster-client-web

[![Download](https://img.shields.io/badge/yarn-taskcluster--client--web-brightgreen)](https://yarnpkg.com/en/package/taskcluster-client-web) [![License](https://img.shields.io/badge/license-MPL%202.0-orange.svg)](http://mozilla.org/MPL/2.0)

MPL-2.0
Latest version published 9 days ago

Package Health Score

66 / 100
Full package analysis

Similar packages