Long Running Process with Scheduled Plugin

Discussions relating to plugin development, and the Jiwa API.

Long Running Process with Scheduled Plugin

Postby SBarnes » Tue Jun 16, 2020 11:41 am

Is there any to have the scheduled plugin service cancel a process if it goes past a given period of time whilst running so it doesn't hold up any other schedules or does the scheduler handle handle multiple task simultaneously so a plugin can't "stall" things?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Long Running Process with Scheduled Plugin

Postby Mike.Sheen » Tue Jun 16, 2020 1:18 pm

SBarnes wrote:Is there any to have the scheduled plugin service cancel a process if it goes past a given period of time whilst running so it doesn't hold up any other schedules or does the scheduler handle handle multiple task simultaneously so a plugin can't "stall" things?


No - and I don't think it would be possible to hack in by spawning off a task in the Execute method and handling it that way without introducing some interesting problems.

We'd be best to add a property you could set from within the plugin itself to add a timeout value - perhaps a TimeSpan - and when not null we could invoke an optional method of the plugin to indicate timeout expired and the plugin could abort in a safe fashion - I don't think we'd forcibly kill a scheduled plugin task upon timeout ourselves.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Long Running Process with Scheduled Plugin

Postby SBarnes » Tue Jun 16, 2020 1:21 pm

Ok thanks,

I think a separate version of the service is likely to be the safest option.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron