Skip to content

Commit 809d982

Browse files
committed
Use 'd.save_resume' to flush session
1 parent cf0a6ee commit 809d982

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

debian/changelog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
pyrocore (0.6.1) precise; urgency=low
1+
pyrocore (0.5.2) precise; urgency=high
22

3-
* Next
3+
* Fix: Use `d.save_resume` to flush session
44

55
-- pyroscope <[email protected]> Sat, 27 May 2017 19:23:30 +0200
66

src/pyrocore/data/config/rtorrent.d/auto-scrape.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ method.insert = pyro._last_scrape.print, simple|private,\
3939

4040
# HELPER: Set current time in a custom field (tm_last_scrape) and save session
4141
method.insert = pyro._last_scrape.bump, simple|private,\
42-
"d.custom.set=tm_last_scrape, $cat=$system.time= ; d.save_full_session="
42+
"d.custom.set=tm_last_scrape, $cat=$system.time= ; d.save_resume="
4343

4444
# COMMAND: Send the scrape request, set 'tm_last_scrape' timestamp, and save session
4545
method.insert = d.tracker.bump_scrape, simple,\

src/pyrocore/data/config/rtorrent.d/timestamps.rc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
# tm_completed = time of completion
55

66
method.insert = pyro.tm_started.now, simple|private,\
7-
"d.custom.set=tm_started,$cat=$system.time= ; d.save_session="
7+
"d.custom.set=tm_started,$cat=$system.time= ; d.save_resume="
88
method.insert = pyro.tm_completed.now, simple|private,\
9-
"d.custom.set=tm_completed,$cat=$system.time= ; d.save_session="
9+
"d.custom.set=tm_completed,$cat=$system.time= ; d.save_resume="
1010

1111
method.set_key = event.download.resumed, time_stamp,\
1212
"branch=d.custom=tm_started,false=,pyro.tm_started.now="
1313
method.set_key = event.download.inserted_new, time_stamp,\
14-
"d.custom.set=tm_loaded,$cat=$system.time= ; d.save_session="
14+
"d.custom.set=tm_loaded,$cat=$system.time= ; d.save_resume="
1515
method.set_key = event.download.finished, time_stamp,\
1616
"pyro.tm_completed.now="
1717
method.set_key = event.download.hash_done,time_stamp,\
@@ -20,7 +20,7 @@ method.set_key = event.download.hash_done,time_stamp,\
2020

2121
# EVENTS: Activation intervals
2222
method.insert = pyro.activations.append, simple|private,\
23-
"d.custom.set=activations,\"$cat=$d.custom=activations,$argument.0=,$system.time=\" ;d.save_full_session="
23+
"d.custom.set=activations,\"$cat=$d.custom=activations,$argument.0=,$system.time=\" ; d.save_resume="
2424
method.set_key = event.download.paused, activations, "pyro.activations.append=P"
2525
method.set_key = event.download.resumed, activations, "pyro.activations.append=R"
2626

@@ -29,15 +29,15 @@ method.set_key = event.download.resumed, activations, "pyro.activations.append=R
2929
method.insert = pyro._tm_downloaded_stat, simple|private,\
3030
"execute.capture=sh,-c,\"echo -n \$(stat -c %Y \\\"$1\\\")\",getDownloadedDate,(d.tied_to_file)"
3131
method.insert = pyro._tm_downloaded_init, simple|private,\
32-
"d.custom.set=tm_downloaded,(cat,(pyro._tm_downloaded_stat)); d.save_full_session="
32+
"d.custom.set=tm_downloaded,(cat,(pyro._tm_downloaded_stat)); d.save_resume="
3333
method.insert = d.timestamp.downloaded, simple, "d.custom=tm_downloaded"
3434
method.set_key = event.download.inserted_new, set_downloaded_date, ((pyro._tm_downloaded_init))
3535

3636

3737
# SCHEDULE: Set "last_active" custom field for items that have peers
3838
method.insert = d.last_active, simple, "if=$d.peers_connected=,$cat=$system.time=,$d.custom=last_active"
3939
method.insert = d.last_active.update, simple|private,\
40-
"d.custom.set=last_active,$cat=$system.time= ; branch=argument.0=,d.save_session="
40+
"d.custom.set=last_active,$cat=$system.time= ; branch=argument.0=,d.save_resume="
4141

4242
schedule2 = pyro_update_last_active, 24, 42,\
4343
"d.multicall2=started,\"branch=$d.peers_connected=,d.last_active.update=\""

src/pyrocore/torrent/rtorrent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def remove_with_links(path):
501501
def flush(self):
502502
""" Write volatile data to disk.
503503
"""
504-
self._make_it_so("saving session data of", ["save_full_session"])
504+
self._make_it_so("saving session data of", ["save_resume"])
505505

506506

507507
class RtorrentEngine(engine.TorrentEngine):

0 commit comments

Comments
 (0)