1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#/bin/bash
#
# Spawn a job based on the queues
#
# Examples:
# spawn gcc-4.5+svn12345
# spawn.sh ~/path/to/thing-to-build.tar.xz
# spawn.sh ~/path/to/thing-to-build.tar.xz queue-name
#
set -e
. ~/.config/cbuild/toolsrc
# Directory this script runs from
here=`dirname $0`
job=$1
priority=${PRIORITY:-.}
# Tidy up job so that you can also supply a path
job=`basename $job`
job=`echo $job | sed -r 's/(.+)\.tar.*/\1/'`
queue=${2:-$job}
closest=$($here/closest.py $queue $scheduler/spawn/$priority/*)
echo Spawning $job into the queue `basename $closest`
# "Demux" via spawn queue into real job queues, use tcwg-web's schedulejob.py
# script for scheduling jobs with LAVA support, etc.
for i in $closest/*; do
PYTHONPATH=$lib/tcwg-web python -m schedulejob `basename $i` $job
echo Spawned into `basename $i`
done
|