Skip to content

Instantly share code, notes, and snippets.

View bhearsum's full-sized avatar

Ben Hearsum (he/him) bhearsum

View GitHub Profile
select * from buildrequests LEFT OUTER JOIN builds on builds.brid =
buildrequests.id WHERE builds.brid IS NULL and buildrequests.complete = 0 and
buildrequests.claimed_at != 0 and (buildrequests.claimed_at < (unix_timestamp() - 300)) order by submitted_at desc;

Keybase proof

I hereby claim:

  • I am bhearsum on github.
  • I am bhearsum (https://keybase.io/bhearsum) on keybase.
  • I have a public key whose fingerprint is 16B7 1522 3A65 B4A3 C6B2 EAE6 244D B936 9D27 F8DB

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am bhearsum on github.
  • I am bhearsum (https://keybase.io/bhearsum) on keybase.
  • I have a public key whose fingerprint is 16B7 1522 3A65 B4A3 C6B2 EAE6 244D B936 9D27 F8DB

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am bhearsum on github.
* I am bhearsum (https://keybase.io/bhearsum) on keybase.
* I have a public key whose fingerprint is 16B7 1522 3A65 B4A3 C6B2 EAE6 244D B936 9D27 F8DB
To claim this, I am signing this object:
def retry(
action, attempts=5, sleeptime=60, max_sleeptime=5 * 60, retry_exceptions=(Exception,),
cleanup=None, args=(), kwargs={}):
"""Call `action' a maximum of `attempts' times until it succeeds,
defaulting to 5. `sleeptime' is the number of seconds to wait
between attempts, defaulting to 60 and doubling each retry attempt, to
a maximum of `max_sleeptime'. `retry_exceptions' is a tuple of
Exceptions that should be caught. If exceptions other than those
listed in `retry_exceptions' are raised from `action', they will be
raised immediately. If `cleanup' is provided and callable it will
--- bs.diff 2014-04-11 10:26:56.427533336 -0400
+++ as.diff 2014-04-11 11:27:50.427637926 -0400
@@ -3349,18 +3349,6 @@
jetpack-fx-team-win8-opt ScriptFactory
jetpack-fx-team-xp-ix-debug ScriptFactory
jetpack-fx-team-xp-ix-opt ScriptFactory
-Rev3 Fedora 12 mozilla-beta debug test mochitest-browser-chrome ScriptFactory
-Rev3 Fedora 12 mozilla-esr24 debug test mochitest-browser-chrome ScriptFactory
-Rev3 Fedora 12 mozilla-release debug test mochitest-browser-chrome ScriptFactory
-Rev3 Fedora 12 release-mozilla-beta debug test mochitest-browser-chrome ScriptFactory
--- bs.diff 2014-04-11 10:26:56.427533336 -0400
+++ as.diff 2014-04-11 11:47:42.267672041 -0400
@@ -3349,18 +3349,6 @@
jetpack-fx-team-win8-opt ScriptFactory
jetpack-fx-team-xp-ix-debug ScriptFactory
jetpack-fx-team-xp-ix-opt ScriptFactory
-Rev3 Fedora 12 mozilla-beta debug test mochitest-browser-chrome ScriptFactory
-Rev3 Fedora 12 mozilla-esr24 debug test mochitest-browser-chrome ScriptFactory
-Rev3 Fedora 12 mozilla-release debug test mochitest-browser-chrome ScriptFactory
-Rev3 Fedora 12 release-mozilla-beta debug test mochitest-browser-chrome ScriptFactory
--- bs.diff 2014-04-11 10:26:56.427533336 -0400
+++ as.diff 2014-04-11 12:25:47.019737439 -0400
@@ -3349,18 +3349,6 @@
jetpack-fx-team-win8-opt ScriptFactory
jetpack-fx-team-xp-ix-debug ScriptFactory
jetpack-fx-team-xp-ix-opt ScriptFactory
-Rev3 Fedora 12 mozilla-beta debug test mochitest-browser-chrome ScriptFactory
-Rev3 Fedora 12 mozilla-esr24 debug test mochitest-browser-chrome ScriptFactory
-Rev3 Fedora 12 mozilla-release debug test mochitest-browser-chrome ScriptFactory
-Rev3 Fedora 12 release-mozilla-beta debug test mochitest-browser-chrome ScriptFactory
➜ tmp cat test.py
#!/usr/bin/env python
class BugzillaClient(object):
def configure(self, bzurl, username=None, password=None, apikey=None):
if apikey:
self.apikey = apikey
self.username = None
self.password = None
if username or password:
➜ tmp cat test.py
#!/usr/bin/env python
class BugzillaClient(object):
def configure(self, bzurl, username=None, password=None, apikey=None):
if apikey:
self.apikey = apikey
self.username = None
self.password = None
if username or password: