timshadel-starling 0.9.8.20080924 → 0.9.8.200810061510
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/etc/starling.redhat +50 -47
- data/lib/starling/handler.rb +1 -2
- data/lib/starling/persistent_queue.rb +5 -0
- data/lib/starling/queue_collection.rb +6 -0
- data/lib/starling/server_runner.rb +5 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
== 0.9.9
|
2
2
|
* remove dependency on SyslogLogger so that starling works on windows.
|
3
|
+
* fix config file loading so relative paths are expanded properly <jacob@jacobatzen.dk>
|
4
|
+
* clean up redhat init.d script <gaffneyc@gmail.com>
|
3
5
|
|
4
6
|
== 0.9.8
|
5
7
|
* add fix to enable relative paths <david@motorator.com>
|
data/etc/starling.redhat
CHANGED
@@ -1,63 +1,66 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
#
|
3
|
+
# Make sure the /var/run/starling, /var/log/starling and /var/spool/starling
|
4
|
+
# all exist and are owned by starling:starling
|
5
|
+
#
|
3
6
|
# starling This shell script takes care of starting and stopping
|
4
7
|
# the starling server
|
5
8
|
# chkconfig: 345 98 98
|
6
9
|
# description: The starling queue server
|
10
|
+
# processname: starling
|
11
|
+
# pidfile: /var/run/starling/starling.pid
|
12
|
+
# logfile: /var/log/starling/starling.log
|
13
|
+
|
14
|
+
# Source function library.
|
15
|
+
. /etc/rc.d/init.d/functions
|
16
|
+
|
17
|
+
# Source networking configuration.
|
18
|
+
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
|
19
|
+
|
20
|
+
DUSER=starling
|
21
|
+
DGROUP=starling
|
22
|
+
LOGFILE=/var/log/starling/starling.log
|
23
|
+
SPOOLDIR=/var/spool/starling
|
24
|
+
PORT=22122
|
25
|
+
LISTEN=0.0.0.0
|
26
|
+
PIDFILE=/var/run/starling/starling.pid
|
7
27
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
elif [ -e /usr/local/bin/pidof ]; then
|
14
|
-
PIDOF="/usr/local/bin/pidof"
|
15
|
-
elif [ -e /bin/pgrep ]; then
|
16
|
-
PIDOF="/bin/pgrep"
|
17
|
-
elif [ -e /usr/bin/pgrep ]; then
|
18
|
-
PIDOF="/usr/bin/pgrep"
|
19
|
-
elif [ -e /usr/local/bin/pgrep ]; then
|
20
|
-
PIDOF="/usr/local/bin/pgrep"
|
21
|
-
else
|
22
|
-
echo "Could not find pidof or pgrep"
|
23
|
-
fi
|
24
|
-
|
25
|
-
PROGDIR="/usr/bin"
|
26
|
-
PROGNAME="starling"
|
27
|
-
OPTIONS="-u nobody -g nobody -L /var/log/starling.log -q /var/spool/starling"
|
28
|
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
29
|
+
NAME=starling
|
30
|
+
INSTALL_DIR=/usr/local/bin
|
31
|
+
DAEMON=$INSTALL_DIR/$NAME
|
32
|
+
OPTS="-h $LISTEN -p $PORT -d -q $SPOOLDIR -P $PIDFILE -L $LOGFILE -u $DUSER -g $DGROUP"
|
28
33
|
|
29
34
|
start() {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
echo "Starting $PROGDIR$PROGNAME"
|
35
|
-
cd $PROGDIR
|
36
|
-
nohup $PROGDIR$PROGNAME $OPTIONS &
|
37
|
-
fi
|
35
|
+
echo -n $"Starting starling: "
|
36
|
+
|
37
|
+
daemon --pidfile=$PIDFILE $DAEMON $OPTS
|
38
|
+
echo
|
38
39
|
}
|
39
40
|
|
40
41
|
stop() {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
else
|
46
|
-
echo "$PROGDIR$PROGNAME not running"
|
47
|
-
fi
|
42
|
+
echo -n $"Stopping starling: "
|
43
|
+
|
44
|
+
killproc -p $PIDFILE starling
|
45
|
+
echo
|
48
46
|
}
|
49
47
|
|
50
48
|
case "$1" in
|
51
|
-
start)
|
52
|
-
|
53
|
-
;;
|
54
|
-
stop)
|
55
|
-
|
56
|
-
;;
|
57
|
-
restart)
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
;;
|
62
|
-
|
49
|
+
start)
|
50
|
+
start
|
51
|
+
;;
|
52
|
+
stop)
|
53
|
+
stop
|
54
|
+
;;
|
55
|
+
restart)
|
56
|
+
stop
|
57
|
+
sleep 3
|
58
|
+
start
|
59
|
+
;;
|
60
|
+
status)
|
61
|
+
status -p $PIDFILE starling
|
62
|
+
;;
|
63
|
+
*)
|
64
|
+
echo $"Usage: $0 {start|stop|restart|status}"
|
65
|
+
exit 1
|
63
66
|
esac
|
data/lib/starling/handler.rb
CHANGED
@@ -40,6 +40,11 @@ module StarlingServer
|
|
40
40
|
when "queue_path" then key = "path"
|
41
41
|
when "log_file" then key = "logger"
|
42
42
|
end
|
43
|
+
|
44
|
+
if %w(logger path pid_file).include?(key)
|
45
|
+
value = File.expand_path(value)
|
46
|
+
end
|
47
|
+
|
43
48
|
options[key.to_sym] = value
|
44
49
|
|
45
50
|
if options[:log_level].instance_of?(String)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timshadel-starling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.8.
|
4
|
+
version: 0.9.8.200810061510
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blaine Cook
|
@@ -13,7 +13,7 @@ autorequire:
|
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
|
16
|
-
date: 2008-08
|
16
|
+
date: 2008-10-08 00:00:00 -07:00
|
17
17
|
default_executable:
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|