user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] lei_auth: s/net_merge_complete/net_merge_all_done/
Date: Sat,  1 May 2021 06:31:22 +0000	[thread overview]
Message-ID: <20210501063122.10231-1-e@80x24.org> (raw)

We use the "done" term elsewhere for similar things, and
my easily-confused mind equates "complete" with shell
completion.
---
 lib/PublicInbox/LeiAuth.pm    | 2 +-
 lib/PublicInbox/LeiImport.pm  | 4 ++--
 lib/PublicInbox/LeiTag.pm     | 4 ++--
 lib/PublicInbox/LeiToMail.pm  | 2 +-
 lib/PublicInbox/LeiXSearch.pm | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/PublicInbox/LeiAuth.pm b/lib/PublicInbox/LeiAuth.pm
index e7b26c5f..877ae6a3 100644
--- a/lib/PublicInbox/LeiAuth.pm
+++ b/lib/PublicInbox/LeiAuth.pm
@@ -27,7 +27,7 @@ sub do_auth_atfork { # used by IPC WQ workers
 sub net_merge_done1 { # bump merge-count in top-level lei-daemon
 	my ($wq) = @_;
 	return if ++$wq->{nr_net_merge_done} != $wq->{-wq_nr_workers};
-	$wq->net_merge_complete; # defined per wq-class (e.g. LeiImport)
+	$wq->net_merge_all_done; # defined per wq-class (e.g. LeiImport)
 }
 
 sub net_merge_all { # called in wq worker via wq_broadcast
diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm
index def121ab..575cf125 100644
--- a/lib/PublicInbox/LeiImport.pm
+++ b/lib/PublicInbox/LeiImport.pm
@@ -48,7 +48,7 @@ sub input_net_cb { # imap_each / nntp_each
 	input_eml_cb($self, $eml, $vmd);
 }
 
-sub net_merge_complete { # callback used by LeiAuth
+sub net_merge_all_done { # callback used by LeiAuth
 	my ($self) = @_;
 	$self->wq_io_do('process_inputs');
 	$self->wq_close(1);
@@ -85,7 +85,7 @@ sub lei_import { # the main "lei import" method
 	(my $op_c, $ops) = $lei->workers_start($self, 'lei-import', $j, $ops);
 	$lei->{wq1} = $self;
 	$lei->{-err_type} = 'non-fatal';
-	net_merge_complete($self) unless $lei->{auth};
+	net_merge_all_done($self) unless $lei->{auth};
 	$op_c->op_wait_event($ops);
 }
 
diff --git a/lib/PublicInbox/LeiTag.pm b/lib/PublicInbox/LeiTag.pm
index 989a6954..2170e3f2 100644
--- a/lib/PublicInbox/LeiTag.pm
+++ b/lib/PublicInbox/LeiTag.pm
@@ -19,7 +19,7 @@ sub input_eml_cb { # used by PublicInbox::LeiInput::input_fh
 
 sub input_mbox_cb { input_eml_cb($_[1], $_[0]) }
 
-sub net_merge_complete { # callback used by LeiAuth
+sub net_merge_all_done { # callback used by LeiAuth
 	my ($self) = @_;
 	$self->wq_io_do('process_inputs');
 	$self->wq_close(1);
@@ -53,7 +53,7 @@ sub lei_tag { # the "lei tag" method
 	(my $op_c, $ops) = $lei->workers_start($self, 'lei-tag', $j, $ops);
 	$lei->{wq1} = $self;
 	$lei->{-err_type} = 'non-fatal';
-	net_merge_complete($self) unless $lei->{auth};
+	net_merge_all_done($self) unless $lei->{auth};
 	$op_c->op_wait_event($ops);
 }
 
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm
index a546ab42..ab4de378 100644
--- a/lib/PublicInbox/LeiToMail.pm
+++ b/lib/PublicInbox/LeiToMail.pm
@@ -669,7 +669,7 @@ sub wq_atexit_child {
 }
 
 # called in top-level lei-daemon when LeiAuth is done
-sub net_merge_complete {
+sub net_merge_all_done {
 	my ($self) = @_;
 	$self->wq_broadcast('do_post_auth');
 	$self->wq_close(1);
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index e04af0dc..d212a732 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -495,7 +495,7 @@ sub do_query {
 	$self->{opt_threads} = $lei->{opt}->{threads};
 	$self->{opt_sort} = $lei->{opt}->{'sort'};
 	if ($l2m) {
-		$l2m->net_merge_complete unless $lei->{auth};
+		$l2m->net_merge_all_done unless $lei->{auth};
 	} else {
 		start_query($self);
 	}

                 reply	other threads:[~2021-05-01  6:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210501063122.10231-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    --subject='Re: [PATCH] lei_auth: s/net_merge_complete/net_merge_all_done/' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/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://public-inbox.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.mail.public-inbox.meta
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.mail.public-inbox.meta
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

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