Skip to content

Instantly share code, notes, and snippets.

diff --git a/master/buildbot/process/botmaster.py b/master/buildbot/process/botmaster.py
index 4f1f348..a5f28f3 100644
--- a/master/buildbot/process/botmaster.py
+++ b/master/buildbot/process/botmaster.py
@@ -317,11 +317,19 @@ class BotMaster(config.ReconfigurableServiceMixin, service.MultiService):
"""
Call this when something suggests that a particular slave may now be
available to start a build.
+ We delay this for 10 seconds, so that if multiple slaves start at the same
+ time, builds will be distributed between them.
@caktux
caktux / docker_cleanup.sh
Last active December 26, 2015 13:39
Docker cleanup
# ~/.bashrc function
# Use `docker-cleanup --dry-run` to see what would be deleted.
function docker-cleanup {
EXITED=$(docker ps -q -f status=exited)
DANGLING=$(docker images -q -f "dangling=true")
if [ "$1" == "--dry-run" ]; then
echo "==> Would stop containers:"
echo $EXITED
echo "==> And images:"
@caktux
caktux / find_replace_with_sed.sh
Created October 16, 2013 21:43
Find and replace with sed
find . -type f -exec sed -i 's/find/replace/g' {} \;
#!/bin/bash
# find all .git directories and exec "git pull" on the parent.
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;
@caktux
caktux / ssh_push_key
Created July 18, 2013 03:31
SSH push key
ssh user@host "echo '`cat ~/.ssh/id_rsa.pub`' >> ~/.ssh/authorized_keys"
@caktux
caktux / reset_drupal_cron
Created July 12, 2013 13:02
Reset Drupal cron
drush @ALIAS vdel cron_semaphore
drush @ALIAS vdel cron_last
drush @ALIAS sqlq "delete from semaphore"
@caktux
caktux / disable_module_sql
Created June 11, 2013 13:08
Disable module with SQL
UPDATE `system` SET `status` = '0' WHERE `name` = 'MODULENAME' LIMIT 1;
@caktux
caktux / change_files_directory
Created June 11, 2013 13:07
Change files directory
UPDATE `files` SET `filepath` = REPLACE(`filepath`, "sites/SITEDOMAIN/files/", "files/SITEDOMAIN/");
@caktux
caktux / drush_module_status
Created June 11, 2013 13:03
Find the status of a module in a site list
drush @SITELIST pmi MODULE -y | grep Status
@caktux
caktux / .profile
Created March 11, 2015 04:10
Get a brew formula version number
# show installed brew formula version
function brew-version {
brew info $1 | awk '{print $3}' | head -n1
}
# show last available brew formula version
function brew-last-version {
brew versions $1 | awk '{print $1}' | head -n1
}