blob: f0e6cf875e107fd063d8282fa03f650417b46cce (
plain)
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
37
38
39
40
41
42
43
44
45
46
47
|
#! /bin/sh
. ../testlib.sh
for db in qdb; do
cleardb $db
done
rm -f log/*.log
mkdir -p state
rm -f state/*
set -e
title LocalConsumer test
title2 Initialization
msg Install PgQ
run_qadmin qdb "install pgq;"
run_qadmin qdb "create queue test_queue;"
msg Run ticker
cat_file conf/pgqd.ini <<EOF
[pgqd]
database_list = qdb
logfile = log/pgqd.log
pidfile = pid/pgqd.pid
EOF
run pgqd -d conf/pgqd.ini
msg Run consumer
cat_file conf/testconsumer_qdb.ini <<EOF
[testconsumer]
queue_name = test_queue
db = dbname=qdb
logfile = log/%(job_name)s.log
pidfile = pid/%(job_name)s.pid
local_tracking_file = state/%(job_name)s.tick
EOF
run ./testconsumer.py -v conf/testconsumer_qdb.ini
|