This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | |
<script type="text/javascript"> | |
var Model = function(){}; | |
Model.prototype = { | |
'value' : null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>My js observer</title> | |
<script type="text/javascript"> | |
"use strict"; | |
var Model = function(){ | |
this.observers = []; | |
this.value = null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pstats | |
# in the ipython shell this returns a list | |
# containing the output of the shell command ls | |
# I generated many profile files, one per log parsed. | |
# all the file names were prefixed with parse_log | |
profiles = !ls parse_log* | |
# read the first file in the list | |
stats = pstats.Stats(profiles.pop()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import simplejson as json | |
from celery import task | |
import time | |
from treeherder.model.derived import JobsModel | |
from treeherder.log_parser.artifactbuildercollection import ArtifactBuilderCollection | |
import profile | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js"></script> | |
<script> | |
// Create SocketIO instance, connect | |
var socket = io.connect('http://local.treeherder.mozilla.org:8005/events'); | |
// Add a connect listener | |
socket.on('connect',function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from treeherder.events.publisher import JobStatusPublisher | |
p = JobStatusPublisher(settings.BROKER_URL) | |
p.publish( | |
1,# job_id | |
1,# resultset_id | |
'mozilla-inbound', # repo | |
'completed' # status | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from celery.task.control import inspect | |
i = inspect() | |
registered = i.registered() | |
active_workers = registered.keys() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
req = Request(method, uri, json=data, auth=auth) | |
prepped_request = req.prepare() | |
print prepped_request.url | |
print prepped_request.headers | |
print prepped_request.text |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer