Page 1 of 1

feature req: prevent desktop from entering standby if processing a queue

Posted: April 18th, 2008, 12:45 am
by uzenet
I have sabnzbd+ running on a windows xp desktop that I have set to sleep after an hour of inactivity. Frequently, I've noticed that I have I'll leave my queue and computer running overnight or for a few hours unattended and I'll return to see that my computer has entered sleep mode. I think nothing unusual of this as I have a post-processing script that puts the computer into S3 sleep. However, when I bring the computer out of standby and look at the queue again, I've noticed that the queue actually did not complete when it should have finished. I suspect that it is windows that is putting the computer into standby as nothing in the sabnzb log indicates otherwise (ie. my sleep post-processing script never ran).

I have seen option settings in other programs that prevent the computer from entering standby. I have no idea how this could be implemented in sabnzbd+, but I hope that something similar could be put in place for times when sabnzd is processing the queue. I know an alternative would be to disable power management on my computer altogether, thus not allow it to sleep automatically but I think there are currently many benefits to having some type of automated power savings/management.

Thanks.

Re: feature req: prevent desktop from entering standby if processing a queue

Posted: April 18th, 2008, 12:13 pm
by nzb_leecher

Re: feature req: prevent desktop from entering standby if processing a queue

Posted: April 18th, 2008, 12:37 pm
by uzenet
i looked over your thread. i never use the shutdown pc option as i always sleep my computer. also, my queue never got close to even finishing downloading let alone post-processing (e.g. 1 gb of a 3-gb, 1 nzb, queue remained). my log shows normal downloading and then cuts out until hours later when the computer is brought out of standby.

Re: feature req: prevent desktop from entering standby if processing a queue

Posted: April 18th, 2008, 2:59 pm
by shypike
If someone can tell me how to to this in Python, I'll be happy to implement it.

Re: feature req: prevent desktop from entering standby if processing a queue

Posted: April 18th, 2008, 3:28 pm
by uzenet
I'm not familiar with programming or coding, but I came across a function called SetThreadExecutionState http://msdn.microsoft.com/library/defau ... nstate.asp that can be used to reset the idletimer so that the machine doesnt enter standby. Perhaps that can be of help. Thanks.

Re: feature req: prevent desktop from entering standby if processing a queue

Posted: April 19th, 2008, 5:49 am
by shypike
Thanks, I'll look for a way to include this in SABnzbd.