[Chennaipy] How to monitor for network disconnection ?

Vijay Kumar B. vijaykumar at zilogic.com
Thu Feb 11 00:12:38 EST 2016


On Wednesday 10 February 2016 11:38 PM, Shrinivasan T wrote:
> Hi all,
>
> I am working on a connector with Google Drive OCR and Indian 
> WikiSource projects.
>
> https://github.com/tshrinivasan/OCR4wikisource
>
> It downloads a PDF, splits into individual pdf files per page and 
> uploads to Google Drive.
>
> When there is some network issue, the upload process stuck.
> We have to keep on watching the script running.
>
> When pressed CTRL + C, the next file is uploaded, if the network is 
> working.
>
> Is there any way to monitor for network disconnection and restart the 
> running script?
>
>

How about using proper timeouts in the upload process?

Regards,
Vijay


More information about the Chennaipy mailing list