Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Hypothesis Stuck Jobs - Setting Up monitoring, automatic cancel and automatic restart

Avatar

Level 4

We have an issue where hypothesis' get stuck in the "execution in progress" indefinitely.  I've seen a few questions regarding this issue but so far no definitive answers.  

 

To mitigate the issue I would like to setup a technical workflow to automatically do the following.

  • Determine if a hypothesis has been in the "execution in progress" state form more than 8 hours.  
  • If a hypothesis has been running more than 8 hours
    • Stop the hypothesis execution
    • Restart the hypothesis execution

It looks like I can determine if a hypothesis has been running more than 8 hours by checking table nms:remaHypothesis and looking for jobs with an "execution in progress" status and a duration of more than 8 hour.  What I can't determine is how to stop the identified stuck hypothesis and restart it from a work flow.

 

Any suggestoins?

1 Accepted Solution

Avatar

Correct answer by
Level 4

Milan put me on the right track but a few adjustments were need to make things right for my situation.  Here is what did the trick.

 

var strId = id from nms.remaHypothesis

nms.remaHypothesis.Stop(strId)
nms.remaHypothesis.Start(strId)

View solution in original post

0 Replies

Avatar

Community Advisor

Hello @Ken_Qrious 

you should stop or kill the workflow first. Then you can restart it.

This should be done within Javascript step.

Regards,

Milan

Avatar

Level 4

Hello @Milan_Vucetic ,

 

Thanks, that's what I was after, the command and examples to stop and restart.  I'll give that a try.

 

Cheers,

 

Ken

Avatar

Correct answer by
Level 4

Milan put me on the right track but a few adjustments were need to make things right for my situation.  Here is what did the trick.

 

var strId = id from nms.remaHypothesis

nms.remaHypothesis.Stop(strId)
nms.remaHypothesis.Start(strId)