save uploaded_memory every minute

This commit is contained in:
Marcos Pinto 2007-10-11 03:47:40 +00:00
parent 106e98a15b
commit 30d357d797
2 changed files with 8 additions and 3 deletions

5
TODO
View File

@ -1,6 +1,5 @@
for 0.5.6 for 0.5.6
1. save upload data intermidently for sake of ratio 1. check on file size warnings "you do not have enough disk space blah blah"
2. check on file size warnings "you do not have enough disk space blah blah"
and see how it works with the new sparse mode. use total_wanted. and see how it works with the new sparse mode. use total_wanted.
3. for the love of all that is pure and holy, figure out why speed limiter 2. for the love of all that is pure and holy, figure out why speed limiter
doesnt work anymore doesnt work anymore

View File

@ -160,6 +160,7 @@ class DelugeGTK:
SetConsoleCtrlHandler(win_handler) SetConsoleCtrlHandler(win_handler)
self.dht_timer = 0 self.dht_timer = 0
self.memory_timer = 0
self.dht_skip = False self.dht_skip = False
def connect_signals(self): def connect_signals(self):
@ -981,6 +982,11 @@ window, please enter your password"))
self.update_interface = self.window.get_property("visible") and not \ self.update_interface = self.window.get_property("visible") and not \
self.is_minimized self.is_minimized
#save uploaded memory every minute
self.memory_timer += 1
if (self.memory_timer == 60):
self.manager.pre_quitting()
self.memory_timer = 0
# Handle the events # Handle the events
self.manager.handle_events() self.manager.handle_events()