Verified Commit 819d89f7 authored by Silvio Rhatto's avatar Silvio Rhatto
Browse files

Feat(batch): simple batch processing

parent 03023dae
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -23,7 +23,21 @@ BASENAME="`basename $0`"
DIRNAME="`dirname $0`"
source $DIRNAME/params

# FIXME
# Batch locally or in remote servers?
# Check if there are any limits for each pool?
# Iterate over all pools and start the mining process
# Check if there are any mining limits
if ! echo $MKP224O_RUN_FLAGS | grep -q -- "-n [0-9]"; then
  # Display warning
  echo "WARNING: cannot find -n flag at MKP224O_RUN_FLAGS"
  echo "Please make sure that you have mining limits for your pools, otherwise this script won't stop by itself."
fi

# Iterate over all pools
for pool in `ls $POOLS`; do
  # Skip the example pool
  if [ "$pool" == "example.org" ]; then
    continue
  fi

  # Start mining
  echo ">batch: processing pool: $pool"
  make -C $BASEDIR mine pool=$pool
done