projects
/
APKPM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d1f11eb
)
start poll_prefix from cron
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 5 Apr 2011 17:14:43 +0000
(19:14 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 5 Apr 2011 17:14:43 +0000
(19:14 +0200)
This first checks if there is poll_prefix queued already and
exit 1 if it does
cron.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/cron.sh
b/cron.sh
new file mode 100755
(executable)
index 0000000..
dd695e6
--- /dev/null
+++ b/
cron.sh
@@ -0,0
+1,10
@@
+#!/bin/bash -x
+
+running=`echo status | nc -w 1 localhost 4730 | grep ^poll_prefix | cut -d" " -f2`
+if [ "$running" -gt 0 ] ; then
+ echo "poll allready queued!"
+ exit 1
+fi
+
+time echo | gearman -N -f poll_prefix
+