On 10/11/18 6:23 PM, Tunde Oyeyemi wrote: > 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. > > 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. > > genieacs version: 1.1.2 > > Tunde Oyeyemi
Hi Tunde Oyeyemi, 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. 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 append a task <https://github.com/genieacs/genieacs/wiki/api-reference#post-devicesdevice_idtasksconnection_request> 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 delete a task <https://github.com/genieacs/genieacs/wiki/api-reference#delete-taskstask_id> in case of failure. My two cents. George Chelidze
_______________________________________________ Users mailing list [email protected] http://lists.genieacs.com/mailman/listinfo/users
