- Timestamp:
- Sep 6, 2011, 11:00:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110710/ippTasks/diskbalance.pro
r31644 r32337 75 75 book listpage balanceControl control 76 76 echo "balance so_ids: $BALANCE_SO_ID_START $BALANCE_SO_ID_RANGE" 77 echo "targetting: $BALANCE_TARGET" 77 78 end 78 79 … … 81 82 echo "$N pages in book" 82 83 book listbook balancePending 84 end 85 86 macro set.balance.target 87 if ($0 != 2) 88 echo "USAGE: set.balance.target (DESTINATION|SOURCE)" 89 break 90 end 91 $BALANCE_TARGET = $1 83 92 end 84 93 … … 95 104 $BALANCE_LIMIT = 500 96 105 $BALANCE_OFFSET = 0 106 $BALANCE_TARGET = "SOURCE" 97 107 # Select Nebulous objects which should be shuffled 98 108 task balance.load … … 180 190 181 191 task.exec 192 # if we are unable to run the 'exec', use a long retry time 193 periods -exec 5 194 182 195 book npages balancePending -var N 183 196 if ($NETWORK == 0) break 184 if ($N == 0) 185 periods -exec 5 186 break 187 end 188 # Reset the speed if we're doing something 189 periods -exec 0.5 197 if ($N == 0) break 190 198 191 199 # look for new objects in balancePending … … 197 205 book getword balancePending $pageName key -var KEY 198 206 book getword balancePending $pageName source_name -var SOURCE 207 book getword balancePending $pageName source_host -var SOURCE_HOST 199 208 book getword balancePending $pageName destination_name -var DESTINATION 200 209 book getword balancePending $pageName destination_host -var DEST_HOST 201 210 # Fix this with multihost restriction when possible. 202 set.host.for.balance $DEST_HOST 211 if ("$BALANCE_TARGET" == "DESTINATION") 212 set.host.for.balance $DEST_HOST 213 else 214 set.host.for.balance $SOURCE_HOST 215 end 216 203 217 204 218 stdout NULL … … 214 228 echo command $run 215 229 end 230 periods -exec 0.05 216 231 command $run 217 232 end 218 233 219 234 # default exit status 220 task.exit default235 task.exit default 221 236 process_exit balancePending $options:0 $JOB_STATUS 222 237 end
Note:
See TracChangeset
for help on using the changeset viewer.
