diff options
author | adv <adv@uma.es> | 2011-12-13 10:53:23 +0000 |
---|---|---|
committer | adv <adv@uma.es> | 2011-12-13 10:53:23 +0000 |
commit | ec051d0b73dfa79e3181ab72a8d1acf0e0c0e4aa (patch) | |
tree | a2ea816d2366231c99fd0ef3ee3d63e23782a0f6 /client/shared/scripts/updateCache | |
parent | 95d4495adaf50e02342755a55ba1849475e19b88 (diff) |
1.0.2 #459 p2p tracker gestiona enjambre de mas de 50 equipos - random (1-120 segundos) antes de iniciar semilla -
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2392 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/scripts/updateCache')
-rwxr-xr-x | client/shared/scripts/updateCache | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/shared/scripts/updateCache b/client/shared/scripts/updateCache index b671b607..2b7f2c3f 100755 --- a/client/shared/scripts/updateCache +++ b/client/shared/scripts/updateCache @@ -79,10 +79,15 @@ fi case "$PROTOCOLO" in torrent | TORRENT ) echo "ogCopyFile $1 $2.torrent absolute $OGCAC/$OGIMG" + # tiempos + timewait=$(expr $(printf '%d\n' 0x$(ogGetMacAddress | awk -F: '{print $5$6}')) \* 120 / 65535) ogCopyFile $REPOSITORIO "$2.torrent" "$IMGDIR" #TODO: comprobar que el tracker definido en el fichero es correcto. #TODO comprobar que el fichero torrent está en cache - echo "ogTorrentStart CACHE $2.torrent $4" + # retardamos el inicio -aleatorio de 0 a 120 segundos- al tracker para gestionar mas de +-40 equipos + P2PWAIT=$[ ( $RANDOM % 120 ) + 1 ] + echo "Esperando $P2PWAIT segundos para iniciar ogTorrentStart CACHE $2.torrent $4" + sleep $P2PWAIT ogTorrentStart CACHE "$2.torrent" $4 ;; multicast | MULTICAST ) |