Code Monkey home page Code Monkey logo

31f2a4fca689c9cb7a130ebb3b633a4ab386b2ba09874217b157f427c27b2cb5's Introduction

A higher level wrapper around taskcluster-client.py with the aim of having a more Pythonic interface to taskcluster.

Currently aiming to get easier, read-only features available.

Synchronous Usage

from taskhuddler import TaskGraph

# All tasks will be cached in memory when TaskGraph is called
# But this means data may get stale.
graph = TaskGraph('M5hSue6oRSu_klunMRHolg')
for task in graph.tasks():
    # These two are equivalent. Task() object knows about some features of a task
    print(task.json['status']['taskId'])
    print(task.taskid)  
# Fetch the set of tasks again.
graph.fetch_tasks()

# On-disk caching:
os.environ['TC_CACHE_DIR'] = '/tmp/cache/'
# All future TaskGraph calls from now on will write the
# json to TC_CACHE_DIR and will avoid a call to taskcluster


# Are all the tasks in the 'completed' state?
print(graph.completed)

if graph.completed:
    started = graph.earliest_start_time
    finished = graph.latest_finished_time
    print("Graph took {} to run".format(finished-started))

Plans

  • Reduce the per-query limit for cached graphs so the initial response is quicker

31f2a4fca689c9cb7a130ebb3b633a4ab386b2ba09874217b157f427c27b2cb5's People

Contributors

bhearsum avatar escapewindow avatar mozilla-github-standards avatar srfraser avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.