user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 5/7] v2writable: cleanup processes when done
  2019-01-11  4:10  5% [PATCH 0/7] implement purge tool Eric Wong
@ 2019-01-11  4:10  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-01-11  4:10 UTC (permalink / raw)
  To: meta

Otherwise, Perl may exit successfully when a failure code
is desired.
---
 lib/PublicInbox/V2Writable.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 970244e..ec28e51 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -291,6 +291,7 @@ sub purge_oids {
 		my $git = PublicInbox::Git->new($git_dir);
 		my $im = $self->import_init($git, 0, 1);
 		$purges->[$i] = $im->purge_oids($purge);
+		$im->done;
 	}
 	$purges;
 }
@@ -499,6 +500,7 @@ sub done {
 	delete $self->{bnote};
 	$self->{transact_bytes} = 0;
 	$self->lock_release if $parts;
+	$self->{-inbox}->git->cleanup;
 }
 
 sub git_init {
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/7] implement purge tool
@ 2019-01-11  4:10  5% Eric Wong
  2019-01-11  4:10  7% ` [PATCH 5/7] v2writable: cleanup processes when done Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-01-11  4:10 UTC (permalink / raw)
  To: meta

Of course, I found and fixed a bunch of little purge bugs
in the process :x

Still need to WTFM so I can tell others to RTFM :>

The following changes since commit b0e5062d43a96372801713ef78a78d6a1bc852bc:

  Merge commit 'mem' (2019-01-10 21:41:55 +0000)

are available in the Git repository at:

  https://public-inbox.org/ purge

for you to fetch changes up to 440b0feaa209e12e4bcb8ef16a95041fce71e7dc:

  implement public-inbox-purge tool (2019-01-11 04:07:17 +0000)

----------------------------------------------------------------
Eric Wong (7):
      hoist out resolve_repo_dir from -index
      import: purge: reap fast-export process
      v2writable: ->purge returns undef on no-op
      v2writable: purge ignores non-existent git epoch directories
      v2writable: cleanup processes when done
      v2writable: read epoch on purge
      implement public-inbox-purge tool

 MANIFEST                      |   4 ++
 lib/PublicInbox/Admin.pm      |  44 +++++++++++++++++
 lib/PublicInbox/Import.pm     |   3 +-
 lib/PublicInbox/V2Writable.pm |  16 ++++--
 script/public-inbox-index     |  32 +-----------
 script/public-inbox-purge     | 111 ++++++++++++++++++++++++++++++++++++++++++
 t/admin.t                     |  81 ++++++++++++++++++++++++++++++
 t/purge.t                     |  97 ++++++++++++++++++++++++++++++++++++
 t/v2writable.t                |   3 ++
 9 files changed, 357 insertions(+), 34 deletions(-)
 create mode 100644 lib/PublicInbox/Admin.pm
 create mode 100755 script/public-inbox-purge
 create mode 100644 t/admin.t
 create mode 100644 t/purge.t

-- 
EW

^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-01-11  4:10  5% [PATCH 0/7] implement purge tool Eric Wong
2019-01-11  4:10  7% ` [PATCH 5/7] v2writable: cleanup processes when done Eric Wong

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).