I hereby claim:
- I am djm on github.
- I am djm (https://keybase.io/djm) on keybase.
- I have a public key whose fingerprint is DBB9 0727 AD94 8582 ECED 66EB 7EA3 B5B0 D8AD 79BB
To claim this, I am signing this object:
| import time | |
| from boto import elastictranscoder | |
| REQUEST_FREQ = 0.3 # Every x seconds | |
| REGION = 'eu-west-1' | |
| TO_CANCEL = [ | |
| 'Progressing', | |
| 'Submitted' | |
| ] |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| import sys, subprocess, collections | |
| from flake8.hooks import git_hook, get_git_param | |
| # `get_git_param` will retrieve configuration from your local git config and | |
| # then fall back to using the environment variables that the hook has always | |
| # supported. | |
| # For example, to set the complexity, you'll need to do: | |
| # git config flake8.complexity 10 | |
| COMPLEXITY = get_git_param('FLAKE8_COMPLEXITY', 10) |
| // Get Card's last URL segment (eg 4468-fix-the-login-page): | |
| javascript:(function(s){try{s=document.selection.createRange().text}catch(_){s=document.getSelection()}prompt('', window.location.href.split("/").pop().split("#")[0])})() | |
| // Get Card's full hash (eg 5731b92ef660293533517de9) : | |
| javascript:(function(s){try{s=document.selection.createRange().text}catch(_){s=document.getSelection()}$('.js-more-menu').click(); prompt('', $('.js-export-json').attr('href').split("/")[2]); $('.js-more-menu').click();})() | |
| // Get Card's unique id (board-independent, eg rKBmQeOk) : | |
| javascript:(function(s){try{s=document.selection.createRange().text}catch(_){s=document.getSelection()}$('.js-more-menu').click(); prompt('', $('.js-short-url').attr('value').split("/").slice(-1)[0]); $('.js-more-menu').click();})() |
| javascript:(function(){$(".load-diff").click();}()); |
| test: | |
| override: | |
| - bundle exec rspec spec | |
| deployment: | |
| acceptance: | |
| branch: master | |
| commands: | |
| - ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>: | |
| timeout: 300 |
To get rq workers talking to opbeat at this current time, you must use a custom rq exception handler and add it to the chain that the worker accepts. This allows us to call opbeat synchronously and avoid the current issues with the opbeat library's async workers.
Both of the examples below keep the original rq exception handler functionality of moving a failed job to the failed queue, but this is optional - if you only want opbeat logging then just don't pass the move_to_failed_queue handler.
Note that we send a lot of extra information about the job itself (see _get_job_details) but this is not a requirement, the stack you get is useful enough without it.
| FROM node:8 | |
| WORKDIR /home/node/app | |
| ADD https://github.com/Yelp/dumb-init/releases/download/v1.1.1/dumb-init_1.1.1_amd64 /usr/local/bin/dumb-init | |
| RUN chmod +x /usr/local/bin/dumb-init | |
| COPY package.json yarn.lock ./ | |
| RUN yarn --pure-lockfile | |
| COPY . . |
| from typing import List, Sequence | |
| def unique_with_order(sequence: Sequence) -> List: | |
| """ | |
| Returns the original sequence as a list with duplicates removed | |
| but, unlike simply using set, the original order is retained. | |
| """ | |
| seen = set() | |
| return [x for x in sequence if not (x in seen or seen.add(x))] |