Skip to content

Instantly share code, notes, and snippets.

etrying after encountering exception#012
DETAIL: Exception information dump: #012
Traceback (most recent call last):#012
File "/usr/local/lib/python2.7/dist-packages/wal_e/worker/s3_worker.py", line 93, in shim#012
return f(*args, **kwargs)#012
File "/usr/local/lib/python2.7/dist-packages/wal_e/worker/s3_worker.py", line 427, in fetch_partition#012
g.get()#012
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 308, in get#012
raise self._exception#012
SSLError: The read operation timed out#012 #012
@micahhausler
micahhausler / gist:5543367
Created May 8, 2013 20:25
TextRazor Error
[2013-05-08 20:23:47,331: ERROR/MainProcess] Process PoolWorker-91
Traceback (most recent call last):
File "/var/www/my-news-api/env/local/lib/python2.7/site-packages/billiard/process.py", line 254, in _bootstrap
self.run()
File "/var/www/my-news-api/env/local/lib/python2.7/site-packages/billiard/process.py", line 103, in run
self._target(*self._args, **self._kwargs)
File "/var/www/my-news-api/env/local/lib/python2.7/site-packages/billiard/pool.py", line 313, in worker
result = (True, func(*args, **kwds))
File "/var/www/my-news-api/env/local/lib/python2.7/site-packages/celery/task/trace.py", line 320, in _fast_trace_task
return _tasks[task].__trace__(uuid, args, kwargs, request)[0]
@micahhausler
micahhausler / gist:5579046
Created May 14, 2013 20:06
TextRazorAnalysisException
Traceback (most recent call last):
File "/var/www/my-news-api/env/local/lib/python2.7/site-packages/billiard/process.py", line 254, in _bootstrap
self.run()
File "/var/www/my-news-api/env/local/lib/python2.7/site-packages/billiard/process.py", line 103, in run
self._target(*self._args, **self._kwargs)
File "/var/www/my-news-api/env/local/lib/python2.7/site-packages/billiard/pool.py", line 313, in worker
result = (True, func(*args, **kwds))
File "/var/www/my-news-api/env/local/lib/python2.7/site-packages/celery/task/trace.py", line 320, in _fast_trace_task
return _tasks[task].__trace__(uuid, args, kwargs, request)[0]
File "/var/www/my-news-api/env/local/lib/python2.7/site-packages/celery/task/trace.py", line 228, in trace_task
@micahhausler
micahhausler / gist:6432434
Last active December 22, 2015 06:39
Django User Manager
from django.contrib.auth.models import User, UserManager
from django.http import HttpResponse, HttpResponseNotFound
# Simple Error
class UserExists(Exception):
pass
# Model Manager
@micahhausler
micahhausler / gist:6470159
Last active December 22, 2015 12:08
packages.sls
postgres-pkgs:
pkg:
- installed
- pkgs:
- postgresql-9.2
- postgis
- postgresql-contrib-9.2
- postgresql-plpython-9.2
- postgresql-server-dev-9.2
@micahhausler
micahhausler / packages.sls
Created September 9, 2013 17:49
Postgres 9.3 packages salt state
#!yaml
#
# Postgres 9.3 packages salt state
#
# Created 9/9/13
#
# author: Micah Hausler, micah.hausler@akimbo.io
postgres-pkgs:
pkg:
@micahhausler
micahhausler / srv_pillar_postgres_init.sls
Last active December 23, 2015 06:49
Pillar include?
postgres:
version: 9.3
user: postgres
group: postgres
data_directory: '/var/lib/postgresql/9.3/main'
@micahhausler
micahhausler / pillar_config.yml
Last active December 23, 2015 11:19
salt django-pillar idea
# yaml
project:
# virtual env path
env: /path/to/venv/bin
# absolute path to django settings
settings_path: /path/to/settings
# django version
version: '1.5.3'
@micahhausler
micahhausler / accept.py
Created November 15, 2013 17:01
Salt Key Interface
import salt.client
from salt.key import Key
client = salt.client.LocalClient()
ret = client.cmd('saltmaster','test.get_opts',[], username='username', password='password', eauth='pam')
opts = ret['saltmaster']
opts['pki_dir'] = '/etc/salt/pki/master/'
kcli = Key(opts)
kcli.all_keys()
@micahhausler
micahhausler / alias.py
Last active March 16, 2016 20:15
Set a domain to an ELB
import boto
from boto.route53.record import ResourceRecordSets
import json
subdomain = 'twitter'
primary_domain = 'tryambition.com'
load_balancer_name = 'elb-2'
elb_conn = boto.connect_elb()