[Kde-pim] Review Request 115817: when connection to server fails, set it offline and retry later
Kevin Krammer
krammer at kde.org
Sun Mar 16 10:49:19 GMT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115817/#review53033
-----------------------------------------------------------
resources/dav/resource/davgroupwareresource.cpp
<https://git.reviewboard.kde.org/r/115817/#comment37330>
Generally looks good, just pondering some ideas:
maybe put that in a small helper method, something like
retryAfterFailure(const QString &errorMessage)
that does the emit, the deferTask and the setTemporaryOffline. That way we can easily change the timeout values in a single place, e.g. if we make the default configurable, etc.
Another option would be to have this as a protected method in AgentBase, i.e. basically replacing the cancelTask() call, something like
repeatFailedTask( const QString &errorMessage, int retryTimeoutInSeconds );
- Kevin Krammer
On March 15, 2014, 9:33 p.m., Martin Koller wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115817/
> -----------------------------------------------------------
>
> (Updated March 15, 2014, 9:33 p.m.)
>
>
> Review request for KDEPIM, Dan Vrátil and Kevin Krammer.
>
>
> Repository: kdepim-runtime
>
>
> Description
> -------
>
> The DAV resource would discard item modifications (add, change, remove) whenever it does not currently reach the DAV server,
> which can happen when I'm connected to the company network but have a DAV server in my home network only.
>
> This patch makes sure to set the resource to temporary offline in these cases and retries to go online at configured check interval.
>
>
> Diffs
> -----
>
> resources/dav/resource/davgroupwareresource.cpp b8b2f74
>
> Diff: https://git.reviewboard.kde.org/r/115817/diff/
>
>
> Testing
> -------
>
> Tested against my owncloud-6 server
>
>
> Thanks,
>
> Martin Koller
>
>
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list