saving on exit problem

General support for problems installing or using Deluge
Post Reply
iXaarii
New User
New User
Posts: 3
Joined: Wed Jul 11, 2007 4:56 pm

saving on exit problem

Post by iXaarii »

Hi. First of all I would like to say just HOW impressed I am with deluge! It's the best linux client I found and I am hugely happy with it! Thank you!
My problem is this: i use deluge to download at my parents' in the background. The problem is that when it's shut down via gnome->shutdown it doesnt seem to save it's progress on the torrents and on the next startup it it rechecks the files. This is a problem since the computer is quite old and it not only takes a long time but also makes a lot of noise as it's checking a 2-3gb download of a file 80% done... even worse if it's several of them. From my tests this doesn't happen if I just quit the program and then shut down. Is there anything I could do? Maybe some kind of script that sends a signal to deluge to properly exit, waits a few seconds and then does a "halt" ?
I'm running 0.52 on mandriva 2007 spring edition.
Thank you in advance and thank you so very much again for making this awesome software!
markybob
Compulsive Poster
Compulsive Poster
Posts: 1230
Joined: Thu May 24, 2007 11:27 pm
Location: Chicago, IL, USA
Contact:

Re: saving on exit problem

Post by markybob »

iXaarii wrote:Hi. First of all I would like to say just HOW impressed I am with deluge! It's the best linux client I found and I am hugely happy with it! Thank you!
My problem is this: i use deluge to download at my parents' in the background. The problem is that when it's shut down via gnome->shutdown it doesnt seem to save it's progress on the torrents and on the next startup it it rechecks the files. This is a problem since the computer is quite old and it not only takes a long time but also makes a lot of noise as it's checking a 2-3gb download of a file 80% done... even worse if it's several of them. From my tests this doesn't happen if I just quit the program and then shut down. Is there anything I could do? Maybe some kind of script that sends a signal to deluge to properly exit, waits a few seconds and then does a "halt" ?
I'm running 0.52 on mandriva 2007 spring edition.
Thank you in advance and thank you so very much again for making this awesome software!
you have to close deluge properly so that it can save fast resume data so that you dont have to recheck the torrent when you start it up again. there's no way around that, unfortunately.
User avatar
zachtib
Leecher
Leecher
Posts: 97
Joined: Thu May 24, 2007 3:26 pm
Location: Louisville, KY
Contact:

Re: saving on exit problem

Post by zachtib »

markybob wrote:you have to close deluge properly so that it can save fast resume data so that you dont have to recheck the torrent when you start it up again. there's no way around that, unfortunately.
Is there no way we can listen for Gnome shutdown being invoked? Or catch an exception? Surely the system sends some sort of kill signal to the running applications on shutdown
Former Deluge Developer
iXaarii
New User
New User
Posts: 3
Joined: Wed Jul 11, 2007 4:56 pm

Re: saving on exit problem

Post by iXaarii »

i also thought maybe I can make a script to send the program a termination signal that it would treat as a ctrl-Q timed exit but couldn't find any way to do it. I would really reeaallly appreciate a solution. My parents and my sisters are starting to really hate me for putting the downloads up because now for like 30 min after system start the computer is making a lot of noise with all the hdd checking and it's working really horrible (it's a 800mhz computer)... I may have to stop downloading :((((( It's a shame cause I live in romania and internet isn't that speedy over here and I was hoping that this way I could sneak in some downloads while family is doing their computer stuffs without having to be around. Any help/sugestions would be highly appreciated. I've tried all the bittorent clients I could find, deluge was the best for many reasons, one of which being that it didn't seam a big resource eater... now I'm running out of ideas. Thank you for your patience and suport!
markybob
Compulsive Poster
Compulsive Poster
Posts: 1230
Joined: Thu May 24, 2007 11:27 pm
Location: Chicago, IL, USA
Contact:

Re: saving on exit problem

Post by markybob »

iXaarii wrote:i also thought maybe I can make a script to send the program a termination signal that it would treat as a ctrl-Q timed exit but couldn't find any way to do it. I would really reeaallly appreciate a solution. My parents and my sisters are starting to really hate me for putting the downloads up because now for like 30 min after system start the computer is making a lot of noise with all the hdd checking and it's working really horrible (it's a 800mhz computer)... I may have to stop downloading :((((( It's a shame cause I live in romania and internet isn't that speedy over here and I was hoping that this way I could sneak in some downloads while family is doing their computer stuffs without having to be around. Any help/sugestions would be highly appreciated. I've tried all the bittorent clients I could find, deluge was the best for many reasons, one of which being that it didn't seam a big resource eater... now I'm running out of ideas. Thank you for your patience and suport!
there really isnt a solution. gnome exiting sends a SIGKILL, which means everything gets quit without even a chance to respond. if anything, it's a gnome bug. i wish there was something we could do about it, but there isnt. we cant account for a SIGKILL
pettman
Member
Member
Posts: 20
Joined: Mon Jul 30, 2007 11:48 pm

Re: saving on exit problem

Post by pettman »

markybob wrote:there really isnt a solution. gnome exiting sends a SIGKILL, which means everything gets quit without even a chance to respond. if anything, it's a gnome bug. i wish there was something we could do about it, but there isnt. we cant account for a SIGKILL
OpenOffice (run on Ubuntu 7.04 in Gnome 2.18.1) somehow manages to ask the user if he/she wishes to save any edited file currently open document before quitting (although you've only got a few seconds to give an answer) and amarok (same system) can save the last song played even if don't shut it down before you shut down the rest of the computer. Or is it that python can't process the sigkill?
One possible solution to the problem would be to create a shutdown script of some kind that told deluge (and what ever other program that might need it) it was time to close and then initiate the shutdown.
iXaarii
New User
New User
Posts: 3
Joined: Wed Jul 11, 2007 4:56 pm

Re: saving on exit problem

Post by iXaarii »

Really? Wow! I can't believe Gnome is as immature as to shut down like that in 2007. I've been a big linux suporter since around 2000, even was a writer for a national linux magazine a few years back, i was sure by now things would have worked out... but not giving apps a chance to save seems like a really unusable API unlike what i've been awaiting for so long. So sad to hear that.
Still, I think you could still do it at your end if you wanted to: i would then do the shutdown not through gnome but through a bash shell script that I'd imagine going something like this:

deluge -- proper_exit // contacts the running deluge program sending it a signal to do a ctrl-Q normal exit
delay 60 // wait for a minute or however long might be required for deluge to properly exit saving progres
halt // and now for that brutal shutdown

You don't by any chance happen to have any hidden command line parameters for deluge that would do that, do you? It would solve all the problems. I would just force/convince everybody to no longer shutdown via gnome but through my custom command via a desktop shortcut and everything would be great... though i still can't believe gnome fails to provide a way for apps to properly save their stuff... shame on gnome... shame shame... but it's still my favorite window manager :P
this solution would be nice though as it wouldn't require anything from gnome (shame! shame), it could be just something like double starting deluge would quit it or something like that.
Also wondering why checking takes so long... couldn't there be a really fast checking based not on reading many gb of data but just checking file dates?... hmmm, i guess not... can't imagine any method based on timestamps that wouldn't require rechecking...
Post Reply