Function return timeout

Hi,



This may be in the wrong forum - I’m not sure if it belongs in general development or plug-in development to be honest.



I’m developing a plug-in which appends an InputDirectoryItem wrapped in a function wrapper to the MediaContainer. The function called runs a helper script and returns a MessageContainer. All this works fine, but my helper script has the potential to run for 20+ minutes (this is expected behaviour and fine for the purpose of the plug-in).



When the function is called, Plex goes to “Waiting for response…” but if it doesn’t get a response within a couple of minutes (I think) it seems to cancel execution of the function (thus cancelling execution of the script) and never getting the MessageContainer returned.



I believe this timeout if it exists would be in some way associated with the MediaContainer or possibly the Append() function of MediaContainer.



Could anyone help me out with any info on configuring a timeout or disabling it altogether for this scenario?



Cheers!

The timeout is set within the media server itself. I believe it’s 5 minutes. This isn’t something that can be controlled by plug-ins, sorry - since they’re designed to be used interactively, we thought that 5 minutes was more than enough time for a reasonable response to a user’s action :slight_smile:

No problem. It ran this a few times and it actually seems to time out after between 30 and 60 seconds. Having thought about it this behaviour is actually preferable - this give enough time for any errors to be caught and returned in the MessageContainer and if nothing is returned in this time the script actually continues on in the background leaving the user free to continue using the rest of Plex while the task continues in the background.



For reference it’s a plug-in to rip DVDs - the feedback to the user when the script finishes successfully is that the DVD ejects. Should be fine.



Cheers.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.