unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH 1/3] watch: flush changes to inbox before updating IMAPTracker
  2020-08-28 10:12 [PATCH 0/3] more watch-related stuff Eric Wong
@ 2020-08-28 10:12 ` Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-08-28 10:12 UTC (permalink / raw)
  To: meta

Data needs to hit inboxes, first.  Otherwise it's possible to
skip messages in case git-fast-import is killed before it sees
"done\n".  Now, -watch will just waste a little bandwidth in
re-downloading a seen message if it's interrupted immediately
before updating IMAPTracker.
---
 lib/PublicInbox/WatchMaildir.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm
index 4ae400f7..78aec8a2 100644
--- a/lib/PublicInbox/WatchMaildir.pm
+++ b/lib/PublicInbox/WatchMaildir.pm
@@ -918,8 +918,8 @@ sub nntp_fetch_all ($$$) {
 		}
 		$last_art = $art;
 	}
-	$itrk->update_last(0, $last_art) if defined $last_art;
 	_done_for_now($self);
+	$itrk->update_last(0, $last_art) if defined $last_art;
 	$err;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-28 10:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 10:12 [PATCH 0/3] more watch-related stuff Eric Wong
2020-08-28 10:12 ` [PATCH 1/3] watch: flush changes to inbox before updating IMAPTracker Eric Wong

unofficial mirror of meta@public-inbox.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://yhetil.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.public-inbox.meta
	nntp://news.public-inbox.org/inbox.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git