Better handling / deleting of failed EAM tasks

I am currently in active development of a project that makes use of a lot of edge gateway agents. We have the edge project stored centrally on the controller gateway, and every time the edge project is saved, an EAM task is automatically called to send the project to any online agent.

This is working great right now, except for the fact that not all gateways are online at the same time currently (and aren't expected to be for the next couple of months). This leads to a huge list of failed tasks in the Agent Tasks section of the controller gateway.


Is there a way to automatically delete all of these or have them not populate? Doing it one by one is very time consuming and inefficient since it has to load a whole new page to confirm that we truly want to delete each failed task.

Has there been any update on this issue? I am dealing with the same situation, and it has become cumbersome manually deleting the failed tasks.

My colleague told me they opened a ticket about this and Inductive replied that it is not possible. All will have to be deleted manually. Took us 4 hours in our case :pensive_face:

It's not strictly impossible (these records exist, as data in the internal db in 8.1)...it's just heavily discouraged to actively modify the .idb on a running system. I think the table is gatewaytaskrecord in the IDB, which is just a SQLite file.

That's officially enough information to be dangerous - make use of it at your own risk.

Last week I was actually able to find a way to do this. I have detailed the steps below:

  • On the Gateway, navigate to /main/web/status/sys.internaldb (I had to type this manually).
  • Inside this page, you should see a few different options, but what we are interested in is the Select Public Tables over on the right.
  • Select the dropdown and find the public table labeled GATEWAYTASKRECORD. Then press the Select All button.
  • Over on the left you can select to Execute, and the query will show you all the Agent tasks on the Gateway (Be extremely careful when doing this because some SQL queries will crash the Gateway).
  • To delete all unwanted or errored Agent tasks, find a property that is consistent across all of the tasks you would like to delete. For me, the ISFORCED property was all 1.
  • In the Enter Query text box, type the following: delete from GATEWAYTASKRECORD where Property you are accessing to delete all unwanted tasks (My command was delete from GATEWAYTASKRECORD where isforced = 1).
  • Execute this command. Again, be extremely careful as deleting from this internal database could cause unwanted issues.