Skip to content

Commit baae0be

Browse files
committed
always use ibeos-lfn-sort to prepend paths when calling ibeos das client
1 parent 27bcc50 commit baae0be

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

Utilities/General/ibeos/das_client

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,14 @@ if [ "${FORMAT}" = "json" ] ; then
6666
fi
6767
else
6868
QUERY_RESULTS=$((curl -f -L -s "${QUERY_URL}" || true) | grep /store/ | sed 's| ||g;s|"||g;s|,||g')
69-
[ $((get_parent_cmds $$ 0 2>&1 || true) | grep -a '/cmsDriver.py' | wc -l) -gt 0 ] && LIMIT_RESULTS="YES"
69+
export CMSSW_LIMIT_RESULTS="-0"
70+
[ $((get_parent_cmds $$ 0 2>&1 || true) | grep -a '/cmsDriver.py' | wc -l) -gt 0 ] && export CMSSW_LIMIT_RESULTS="20"
7071
if [ "${QUERY_RESULTS}" = "" ] ; then
7172
${ORIG_DAS_CLIENT} "$@" > ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.out
7273
else
7374
echo "${QUERY_RESULTS}" > ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.out
7475
fi
7576
fi
76-
echo $LIMIT_RESULTS >> ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.info
77-
if [ "$LIMIT_RESULTS" = "YES" ] ; then
78-
cat ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.out | ibeos-lfn-sort > ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.selected
79-
cat ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.selected
80-
else
81-
cat ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.out
82-
fi
77+
echo $CMSSW_LIMIT_RESULTS >> ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.info
78+
cat ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.out | ibeos-lfn-sort > ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.selected
79+
cat ${DAS_QUERY_DIR}/${QUERY_SHA_HASH}.selected

Utilities/General/scripts/ibeos-lfn-sort

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@ else
4747
esac
4848
done
4949
fi
50-
echo $(echo $IBEOS_FILES | tr ' ' '\n' | sort -u) $(echo $NON_IBEOS_FILES | tr ' ' '\n' | sort -u) | tr ' ' '\n' | grep '/store' | head -n 20
51-
50+
if [ -z "$CMSSW_LIMIT_RESULTS" ]; then
51+
CMSSW_LIMIT_RESULTS=20
52+
fi
53+
echo $(echo $IBEOS_FILES | tr ' ' '\n' | sort -u) $(echo $NON_IBEOS_FILES | tr ' ' '\n' | sort -u) | tr ' ' '\n' | grep '/store' | head -n $CMSSW_LIMIT_RESULTS

0 commit comments

Comments
 (0)