pavel-demin / red-pitaya-notes

Notes on the Red Pitaya Open Source Instrument
http://pavel-demin.github.io/red-pitaya-notes/
MIT License
338 stars 210 forks source link

WSPR Curl timeout (enhancement) #786

Closed davidhay45 closed 5 years ago

davidhay45 commented 5 years ago

Suggested enhancement

Description of the setup:

Description of the problem:

If the wsprnet.org website is slow or unavailable then the curl upload in decode-wspr.sh script times out and simply deletes the file to be uploaded.

To fix this in the decode-wspr.sh script replace

rm -f $ALLMEPT

with

if [ $? -eq 0 ]
then 
    echo "curl upload ok"
    rm -f $ALLMEPT
else
    echo "curl upload failed"
fi

Then the spots file is not deleted but will be uploaded at the next or later attempt.

pavel-demin commented 5 years ago

It's how it was initially implemented. However, the wsprnet maintainers requested to remove ALL_WSPR.TXT without checking if it was successfully uploaded. Here is a link to the corresponding commit: https://github.com/pavel-demin/red-pitaya-notes/commit/830d00c008c0920b9816c8f841aabac5fa6d57e0.

davidhay45 commented 5 years ago

I can see that they do not want huge uploads after the wsprnet server has been down for a while, BUT it would be better to have a couple of retries built in to make it “temporary failure tolerant”. Difficult to do in a regular running script though.