Skip to content

Instantly share code, notes, and snippets.

@gregarndt
Created June 22, 2016 17:44
Show Gist options
  • Save gregarndt/be3c5f81d60a833775fac69be309cdbe to your computer and use it in GitHub Desktop.
Save gregarndt/be3c5f81d60a833775fac69be309cdbe to your computer and use it in GitHub Desktop.
import taskcluster from 'taskcluster-client'
async () => {
// retrieved from the tc-vcs logs from the task that failed. It shows it
// downloading the last known good version of the tarball and the index namespace
// lines look like:
// GET https://index.taskcluster.net/v1/task/tc-vcs.v1.clones.f0d09fb92317a4a669d300943887f7b8
// and
// GET https://queue.taskcluster.net/v1/task/bohiEJmfRbeB-SxW7WU7Kg/artifacts/public/hg.mozilla.org/releases/mozilla-beta.tar.gz
let taskId = "bohiEJmfRbeB-SxW7WU7Kg";
let namespace = "tc-vcs.v1.clones.f0d09fb92317a4a669d300943887f7b8";
let opts = {
taskId: taskId,
data: {},
rank: Date.now(),
expires: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000);
};
let index = new taskcluster.Index();
await index.insertTask(namespace, opts);
}().catch(err => { console.log(err.stack) });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment