diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-08-11 16:58:07 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-08-11 16:58:07 +0000 |
| commit | 434a421ecc2a77e655a5c46087ac6f27c04ce489 (patch) | |
| tree | 4baef3a35022ef9ba54cf25fbebafbd0cfb93d0e | |
| parent | cd3d00b6b76c96076202bcd63867c515e25b7794 (diff) | |
| download | boca-434a421ecc2a77e655a5c46087ac6f27c04ce489.tar.gz boca-434a421ecc2a77e655a5c46087ac6f27c04ce489.zip | |
improvements in the displayed info
| -rw-r--r-- | src/ftask.php | 6 | ||||
| -rw-r--r-- | tools/control-machines.sh | 19 |
2 files changed, 19 insertions, 6 deletions
diff --git a/src/ftask.php b/src/ftask.php index a080db3..c63dc1c 100644 --- a/src/ftask.php +++ b/src/ftask.php @@ -293,8 +293,10 @@ function DBNewTask($param, $c=null, $autotask=false) { if(isset($param['taskstatus']) && !isset($param['status'])) $param['status']=$param['taskstatus']; if(isset($param['taskdesc']) && !isset($param['desc'])) $param['desc']=$param['taskdesc']; if(isset($param['tasksystem']) && !isset($param['sys'])) $param['sys']=$param['tasksystem']; - $param['filepath']=sanitizeFilename($param['filepath']); - $param['filename']=sanitizeFilename($param['filename']); + if(isset($param['filepath'])) + $param['filepath']=sanitizeFilename($param['filepath']); + if(isset($param['filename'])) + $param['filename']=sanitizeFilename($param['filename']); $ac=array('contest','site','user','desc'); $ac1=array('color','colorname','updatetime','filename','filepath','sys','tasknumber','status', diff --git a/tools/control-machines.sh b/tools/control-machines.sh index 5997e64..e46600b 100644 --- a/tools/control-machines.sh +++ b/tools/control-machines.sh @@ -27,11 +27,22 @@ else echo "`echo -n $lin | cut -d':' -f5` $pas $pass 0" done else - for arquivo in runs-submitted-1-1-*txt; do - TIME="$(cut -d'-' -f5 <<< "$arquivo")" - printf "$TIME " - grep '\-2[0-1][0-9]\-' $arquivo|cut -d'-' -f1 |sort -u|wc -l + for i in `ls runs-submitted*.txt`; do + cat $i | while read lin; do + l1=`echo $lin | cut -d'-' -f1` + q=`grep -c $l1 runs-submitted*.txt | wc -l` + if [ "$q" != "1" ]; then + echo "===Computer $l1 used by multiple users" + grep -c $l1 runs-submitted*.txt + fi + done done + # for arquivo in `ls runs-submitted-*txt`; do + # TIME="$(cut -d'-' -f3-5 <<< "`basename $arquivo .txt`")" + # printf "$TIME " + # ##grep '\-2[0-1][0-9]\-' + # cat $arquivo|cut -d'-' -f1 |sort -u|wc -l + # done fi fi |