You could set it at infinity. Long.MAX_VALUE. Hunter
On Wed, Jun 5, 2019 at 10:24 AM DImuthu Upeksha <[email protected]> wrote: > Hi Less, > > Thanks a lot for the clarification. This helped a lot. Is there a way where > I can set the Builder.setTimeoutPerTask(infinity)? Will setting -1 work > here? > > Thanks > Dimuthu > > On Wed, Jun 5, 2019 at 12:22 PM Hunter Lee <[email protected]> wrote: > > > Hi Dimuthu - > > > > Task Framework uses the abstraction of workflows, jobs, and tasks. With > > that said, suppose you have a job with 10 tasks. You could set a timeout > > for that job containing 10 tasks, or set a timeout for its individual > > tasks. > > > > For example, if you use Builder.setTimeout(2 hours), then the job itself > > will time out after 2 hours if it hasn't completed within that timeframe. > > Note that all ongoing tasks belonging to that job will be timed > > out/cancelled as well. > > > > If you use Builder.setTimeoutPerTask(30 min), then when an each task > > belonging to that job is actually executed, it will have a timeout of 30 > > minutes, and if it hasn't completed after 30 minutes, only that task will > > be timed out, not its parent job. > > > > Hope that helps, > > Hunter > > > > On Wed, Jun 5, 2019 at 6:44 AM DImuthu Upeksha < > [email protected]> > > wrote: > > > >> Hi Folks, > >> > >> I have seen some tasks are getting cancelled automatically when they are > >> running more than 1 hour. I feel like the controller is doing that based > >> on > >> some sort of a timeout. Can we remove that timeout? I saw 2 api methods > >> that are related to this problem but I don't have a clear Idea on what > >> each > >> one is doing. Can you please help me to clarify these details. > >> > >> JobConfig.Builder.setTimeout (This one has infinite default value) > >> > >> JobConfig.Builder.setTimeoutPerTask (This one has the default value of 1 > >> hour) > >> > >> Thanks > >> > >> Dimuthu > >> > > >
