From 53ad277f5a53892e8f2e1f703dfc71777f2da9b8 Mon Sep 17 00:00:00 2001 From: Nicolo Magini Date: Mon, 21 Sep 2015 18:55:37 +0200 Subject: [PATCH] Nicer string formatting code... --- DataPopularity/popdb.crab/collector/lib/cronPopDB.sh | 10 ++-------- DataPopularity/popdb.crab/collector/module.cfg | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/DataPopularity/popdb.crab/collector/lib/cronPopDB.sh b/DataPopularity/popdb.crab/collector/lib/cronPopDB.sh index 85cfae0..bb030d5 100755 --- a/DataPopularity/popdb.crab/collector/lib/cronPopDB.sh +++ b/DataPopularity/popdb.crab/collector/lib/cronPopDB.sh @@ -24,16 +24,10 @@ while [ $startHour -lt 24 ]; do endHour=$((startHour+window)) - startHourStr=0$startHour - startHourStr=${startHourStr: -2} - - endHourStr=0$endHour - endHourStr=${endHourStr: -2} - - startDate="`date -d '-1 day' +\%Y-\%m-\%d` "$startHourStr":00:00" + startDate="`date -d '-1 day' +\%Y-\%m-\%d` "$(printf %02d $startHour)":00:00" if [ $endHour -lt 24 ]; then - endDate="`date -d '-1 day' +\%Y-\%m-\%d` "$endHourStr":00:00" + endDate="`date -d '-1 day' +\%Y-\%m-\%d` "$(printf %02d $endHour)":00:00" else endDate="`date +\%Y-\%m-\%d` 00:00:00" fi diff --git a/DataPopularity/popdb.crab/collector/module.cfg b/DataPopularity/popdb.crab/collector/module.cfg index 056630f..e62a363 100644 --- a/DataPopularity/popdb.crab/collector/module.cfg +++ b/DataPopularity/popdb.crab/collector/module.cfg @@ -3,7 +3,7 @@ name = popularity-crab-cron author = CERN IT-SDC (was IT-ES) CMS Data Popularity Team author_email = cms-popdb-admins@cern.ch url = '' -version = 0.2.0 +version = 0.2.2 long_description = CMS Data Popularity Collection service to collect the usage of CMS official data from CRAB reports description = CMS Data Popularity Collection service for CRAB reports