Commits

Anonymous committed d63204c

Fix the display of the URL in the "enqueue" script

Comments (0)

Files changed (1)

     exit
 fi
 
-url=${1:-"http://php-resque.dotcloudapp.com/editor"}
+url=${1:-"http://php-resque.dotcloudapp.com/"}
 queue=${2:-default}
 number=${3:-10}
 csrf_token=4a42d1031ffb6cae2d5a9da00ffad955
 
-if [ `basename $url` != "editor" ] ; then
-    url="$url/editor"
+uri=`basename $url`
+if [ $uri = "editor" ] || [ $uri = "panel" ] ; then
+    url=`dirname $url`
 fi
 
-echo -e "\033[1;34m-->\033[0m http://php-resque.dotcloudapp.com/panel"
+echo -e "\033[1;34m-->\033[0m $url"
 echo -e "\033[1;34m-->\033[0m Queue: $queue"
 echo -e "\033[1;34m-->\033[0m Number of jobs: $number"
 
 echo -ne "\033[1;31m]\r\033[1;34m--> \033[1;31m[\033[0m"
 
 for ((i = 0 ; i != number ; i = i + 1)) ; do
-    curl $url                           \
+    curl $url/editor                    \
         -b "ci_csrf_token=$csrf_token"  \
         -F "ci_csrf_token=$csrf_token"  \
         -F "job_name=hammer-$i"         \