unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH v2] nmbug: write tags out to a temporary file, not 'nmbug.index'
Date: Sun, 13 Feb 2022 10:18:48 -0700	[thread overview]
Message-ID: <87a6eu3csn.fsf@athena.silentflame.com> (raw)
In-Reply-To: <20220213165408.972859-1-spwhitton@spwhitton.name>

Hello,

On Sun 13 Feb 2022 at 09:54am -07, Sean Whitton wrote:

> If more than nmbug process is running at once, then each will try to
> read and write the same file.  The particular failure I've seen is
> that the process which finishes first deletes nmbug.index, and then
> the other process dies with a FileNotFoundError.  So use a distinct
> temporary file per process.
> ---
>  devel/nmbug/nmbug | 44 ++++++++++++++++++++++----------------------
>  1 file changed, 22 insertions(+), 22 deletions(-)
>
> Here is a second attempt, though I'm afraid I have little idea whether it is
> idiomatic Python.

It would seem this causes 'nmbug status' to output just one result.

I'll leave the fix to someone with more Python experience.  Sorry for
the improperly tested v2 patch.

-- 
Sean Whitton

  parent reply	other threads:[~2022-02-13 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <id:m2pmnr2o2f.fsf@guru.guru-group.fi>
2022-02-13 16:54 ` [PATCH v2] nmbug: write tags out to a temporary file, not 'nmbug.index' Sean Whitton
2022-02-13 17:17   ` Kyle Meyer
2022-02-13 17:18   ` Sean Whitton [this message]
2022-02-13 18:08     ` Tomi Ollila

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://notmuchmail.org/

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

  git send-email \
    --in-reply-to=87a6eu3csn.fsf@athena.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=notmuch@notmuchmail.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.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).