Skip to content

Instantly share code, notes, and snippets.

View dcramer's full-sized avatar
💭
I may be slow to respond.

David Cramer dcramer

💭
I may be slow to respond.
View GitHub Profile
Stacktrace (most recent call last):
File "/home/build/phabricator/src/applications/conduit/controller/PhabricatorConduitAPIController.php", line 38, in processRequest
$call = new ConduitCall($method, $params);
File "/home/build/phabricator/src/applications/conduit/call/ConduitCall.php", line 19, in __construct
$this->handler = $this->buildMethodHandler($method);
File "/home/build/phabricator/src/applications/conduit/call/ConduitCall.php", line 100, in buildMethodHandler
$application = $method->getApplication();
File "/home/build/phabricator/src/applications/chatlog/conduit/ConduitAPI_chatlog_Method.php", line 9, in getApplication
return PhabricatorApplication::getByClass('PhabricatorApplicationChatlog');
class EverythingCollector(Collector):
"""
More or less identical to the default Django collector except we always
return relations (even when they shouldnt matter).
"""
def collect(self, objs, source=None, nullable=False, collect_related=True,
source_attr=None, reverse_dependency=False):
new_objs = self.add(objs)
if not new_objs:
return
txagent (python module)
resources/ (various things, like upstart conf)
Need to:
- install txagent into python site-packages (taken care of)
- put resource data files in arbitrary place or something (they're not required by txagent itself)
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/var/lib/jenkins/workspace/tests-and-coverage/env/lib/python2.7/site-packages/paramiko/agent.py", line 116, in run
self._communicate()
File "/var/lib/jenkins/workspace/tests-and-coverage/env/lib/python2.7/site-packages/paramiko/agent.py", line 126, in _communicate
events = select([self._agent._conn, self.__inr], [], [], 0.5)
TypeError: argument must be an int, or have a fileno() method.
class ConfigurationView(BaseView):
def get_conf_key(self):
raise NotImplementedError
def get_form_class(self, request):
raise NotImplementedError
def render(self, request, template, context=None, **kwargs):
from sentry.web.helpers import render_to_response
from datetime import timedelta
from celery.task import periodic_task, task
from celery.task.schedules import crontab
from django.utils import timezone
from sentry.constants import MINUTE_NORMALIZATION
from sentry.utils import math
def fsteps(start, stop, steps):
import inspect
import time
from django_statsd.clients import statsd
from django.http import Http404
class GraphiteResponseCodeMiddleware(object):
def process_response(self, request, response):
"""
sentry.tsdb.models
~~~~~~~~~~~~~~~~~~
Get a key:
>>> key = Key.objects.get_or_create(
>>> name='events.group.{}'.format(group_id)
>>> )
cursor = (shard 0, id 0, group id 0)
> get 10k items from shard 0
> group id set to max(id of results), say 20000
> get 10k items from shard 1 < group id (20000)
> adjust id if we hit 10k+ items, and repeat on same shard
> once group id is hit, go to next shard, and repeat same logic used on shard 1
> once last shard is done, go back to shard 0, get the next 10k results, and reset group id
BeautifulSoup==3.2.1
Django==1.5.1
South==0.7.6
amqp==1.0.11
amqplib==1.0.2
anyjson==0.3.3
billiard==2.7.3.26
-e git+https://github.com/mlafeldt/camplight#egg=camplight
celery==3.0.17
celerymon==1.0.3