<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 10/11/18 6:23 PM, Tunde Oyeyemi wrote:<br>
<blockquote type="cite"
cite="mid:95ec9f86-0917-9a86-2b12-704aaafd36f7@ipnxnigeria.net">Please
I require an assistance in addressing an issue. I have several
pending tasks mainly refreshObject, getparameters and
setparameters on several CPEs and this is due to the fact that the
devices were offline at the time of API execution.
<br>
<br>
How do I prevent this from happening perhaps if I have a check I
can run to check the device status(offline or online). I can then
exclude offline devices from API calls.
<br>
<br>
genieacs version: 1.1.2
<br>
<br>
Tunde Oyeyemi
<br>
</blockquote>
<p>Hi Tunde Oyeyemi,</p>
<p>Please stop posting the same issue with different subjects to the
list, in most cases you won't get any reply to any of them.</p>
<p>This time let's think about your question. Even if you have a
special API call or whatever to check whether a CPE is online, how
can you be sure, that it's still online at the moment you are
sending your second request? The short answer is - you can't.
Maybe it's possible to <a moz-do-not-send="true"
href="https://github.com/genieacs/genieacs/wiki/api-reference#post-devicesdevice_idtasksconnection_request">append
a task</a> with connection_request parameter and also somehow
indicate that it shouldn't be queued if it fails (status code !=
200)? I didn't find anything like that in wiki. As a workaround,
what you really can do is to <a moz-do-not-send="true"
href="https://github.com/genieacs/genieacs/wiki/api-reference#delete-taskstask_id">delete
a task</a> in case of failure.</p>
<p>My two cents.</p>
<p>George Chelidze<br>
</p>
<p><br>
</p>
</body>
</html>