Changeset 9355 for trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
- Timestamp:
- 02/19/09 21:22:19 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r9221 r9355 60 60 rm -v $lockfile 61 61 fi 62 date63 62 exit 64 63 fi … … 90 89 rm -v $lockfile 91 90 fi 92 date93 91 printprocesslog "INFO finished $0" 94 92 exit … … 184 182 checklock0=$? 185 183 case $checklock0 in 186 0) echo " checklock0=$checklock0 -> continue " ;;187 1) echo " checklock0=$checklock0 -> file $lockfile exists"188 date184 0) printprocesslog "INFO checklock0=$checklock0 -> continue " 185 ;; 186 1) printprocesslog "WARN checklock0=$checklock0 -> file $lockfile exists" 189 187 $@ 190 188 exit;; 191 *) echo "checklock0=$checklock0 -> something went completely wrong" ;;189 *) printprocesslog "ERROR checklock0=$checklock0 -> something went completely wrong" ;; 192 190 esac 193 191 } … … 218 216 { 219 217 case $@ in 220 start) echo "setstatus start"218 start) printprocesslog "INFO setstatus start" 221 219 starttime="Now()" 222 220 ;; 223 221 stop) case $check in 224 ok) echo "setstatus stop - ok"222 ok) printprocesslog "INFO setstatus stop - ok" 225 223 statustime="Now()" 226 224 ;; 227 no) echo "setstatus stop - nothing new"225 no) printprocesslog "INFO setstatus stop - nothing new" 228 226 check="ok" 229 227 ;; 230 *) echo "setstatus stop - failed"228 *) printprocesslog "INFO setstatus stop - failed" 231 229 starttime=noreset 232 230 if [ "$check" == "" ] … … 242 240 esac 243 241 ;; 244 *) echo "error -> exit" 245 printprocesslog "ERROR function evalstatus got wrong variable" 242 *) printprocesslog "ERROR function evalstatus got wrong variable" 246 243 finish 247 244 ;; … … 279 276 { 280 277 process= 281 echo "getting todo..."278 printprocesslog "INFO getting todo..." 282 279 getdbsetup 283 280 getstepinfo … … 303 300 query=$query" limit 0, $@ " 304 301 fi 305 echo "QUERY: "$query302 printprocesslog "INFO QUERY: "$query 306 303 if ! process=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "` 307 304 then 308 echo "ERROR could not query processes from db -> exit"309 305 printprocesslog "ERROR could not query processes from db (program: $program, function gettodo)" 310 306 finish … … 313 309 if [ "$process" = "" ] 314 310 then 315 echo "=> nothing to do"311 printprocesslog "INFO => nothing to do" 316 312 finish 317 313 else … … 340 336 query=$query" and isnull(fStartTime) and isnull(fFailedTime) and isnull(fProgramId) and isnull(fReturnCode) " 341 337 query=$query" group by $column " 342 # echo "QUERY: "$query338 # printprocesslog "INFO QUERY: "$query 343 339 if ! numproc=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "` 344 340 then 345 echo "ERROR could not query number of todo proceses from db -> continue"346 341 printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus)" 347 342 cont … … 364 359 if [ "$reset" = "no" ] 365 360 then 366 echo "YOU CAN'T RESET $column for ${primaries[$s+$s]}!!!" 367 printprocesslog "ERROR you can't reset $column for ${primaries[$s+$s]}" 361 printprocesslog "ERROR You cannot reset $column for ${primaries[$s+$s]}" 368 362 finish 369 363 fi … … 391 385 query=$query" and ${prims[$i]}='${primaries[$s*${#prims[@]}+$i]}' " 392 386 done 393 echo "QUERY: "$query387 printprocesslog "INFO QUERY: "$query 394 388 if ! mysql -s -u $us --password=$pw --host=$ho $db -e " $query " 395 389 then 396 echo "ERROR could not insert status into db -> exit"397 390 printprocesslog "ERROR could not set status in db (program: $program, function setstatus)" 398 391 finish
Note:
See TracChangeset
for help on using the changeset viewer.