[sword-devel] Abort module installation via API + Custom network timeouts

Troy A. Griffitts scribe at crosswire.org
Thu Aug 27 19:09:51 EDT 2020


Hi Jaak,

> However, if the connection hangs and no progress is made, is control
> ever passed to the status reporters (before timing out)?
 
No, not before timing out. The purpose of the terminate() method is to cancel a healthy running install. I don't know of a safe way to stop ftplib or libcurl once you've told it to connect and before it times out. If you have any ideas, I'm all ears. But I think the request here was to both:

a) provide a mechanism to adjust the timeout,
b) request to cancel a long running, healthy installation process.

And I believe they are both covered now.

Let me know if you have any suggestions for improvement.

Troy

On August 27, 2020 11:10:18 PM GMT+02:00, Jaak Ristioja <jaak at ristioja.ee> wrote:
>Thank you, Troy! You wrote in the comment:
>
>    /** Request nicely to terminate an ongoing transfer.
>    * If threading is a concern, consider calling terminate() from your
>status reporters
>     * as they are typically the link between the transfer thread and
>your UI.
>     */
>
>However, if the connection hangs and no progress is made, is control
>ever passed to the status reporters (before timing out)?
>
>J
>
>On 27.08.20 21:37, Troy A. Griffitts wrote:
>> Hi Tobias,
>> CURLOPT_TIMEOUT_MS
>> Yes, you can let your users cancel an install by calling the
>> InstallMgr::terminate() method.  I have just now commented this
>method
>> better so its purpose is more clear.  My apologies, Jaak, for not
>having
>> this commented better for you.
>> 
>> Troy
>> 
>> 
>> On 8/8/20 9:30 AM, Tobias Klein wrote:
>>> Hi,
>>>
>>> Is there a way to abort a module installation via the SWORD API?
>>> I saw in InstallMgr::installModule that there is some handling for
>>> when the user aborted the process. But it doesn't seem like this is
>>> controlled via the API.
>>>
>>> One typical use case would be that the user's download speed is
>>> currently slower then acceptable (whether due to internet issues or
>>> server issues). In this case, instead of waiting "forever" one may
>>> want to abort a download/installation.
>>>
>>> Also, another question in the same context: Is it possible to
>>> configure a custom timeout for the download of modules? What happens
>>> if a repository server goes down? I remember one time when the
>Xiphos
>>> repo was not available, waiting times seemed to be too long in the
>>> frontend (based on long default timeouts in SWORD?).
>>>
>>> Best regards,
>>> Tobias
>>>
>>> _______________________________________________
>>> sword-devel mailing list: sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
>_______________________________________________
>sword-devel mailing list: sword-devel at crosswire.org
>http://www.crosswire.org/mailman/listinfo/sword-devel
>Instructions to unsubscribe/change your settings at above page

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20200828/2849d9f4/attachment.html>


More information about the sword-devel mailing list