Asynchronous Import set stuck in loading state and data never got imported

Sai vsk
Tera Expert

Hi,

We have a integration which will bring workstation data into servicenow through rest api. And this we are getting through a scheuled job which will run daily at 11 PM cet. Sometimes, in import set table it only fetching some records and later it stuck in loading state and it never processed. But when we run manually the scheuled job it is fetching all the records. What might be the issue?

2 REPLIES 2

CJose
Tera Contributor

I faced a similar issue while importing vulnerabilities data using REST. In my case certain JSON tags were missing in some of the incoming data sets due to which the run was getting hung. I overcame this by putting a check in my JSON parse logic with an 'if' condition. So if that JSON tage is temporarily absent, system won't attempt to parse that part.

Try using an 'if' condition before each line in your JSON parse code where you are trying to set data.

 

Best,

Cyriac

Hi @CJose ,

Thanks for your reply. Can you share the example code if possible.