From nobody Sat Apr 20 03:30:46 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1547196411035748.5629282833689; Fri, 11 Jan 2019 00:46:51 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1047B92A57; Fri, 11 Jan 2019 08:46:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED9F960920; Fri, 11 Jan 2019 08:46:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CF4A13F954; Fri, 11 Jan 2019 08:46:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0B8kkL3012097 for ; Fri, 11 Jan 2019 03:46:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6F7DF60920; Fri, 11 Jan 2019 08:46:46 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63C1B2E07C for ; Fri, 11 Jan 2019 08:46:43 +0000 (UTC) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 44D5F2CD7F1 for ; Fri, 11 Jan 2019 08:46:42 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id l9so14206457wrt.13 for ; Fri, 11 Jan 2019 00:46:42 -0800 (PST) Received: from donizetti.lan ([2001:b07:6468:f312:29c6:8eb4:8a56:e1f2]) by smtp.gmail.com with ESMTPSA id t4sm28914644wrb.64.2019.01.11.00.46.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 00:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=V+5XuW0q095RQT9nDAtOfRIlV0JU7kVuJ2Ss/INqKP8=; b=Gb04Ha7W75zzNuqYhLnQG5VygAD5Pwy0KkNl4MphCs1qyNTkNBq6z+i5cgt8Ymf1UO /hqpLCHgYfboJm/IwLwDWeNf30d4U9eTE2FPvlBgbFRyH+qfRmWNvIGa2EVOkwlNn2Qe tGKge7yuWYwXqGdVRQUeXYaGXnfS/7WVjKd1vv/CKWF0tFXhak1QAPfLiDnhAGdCesa6 csguwLCr7Aj/Ctc01Ph6RDYh92W9lB/+MYTVklzklXUzSwrze16enD8rkSmypyxyT8eg JTYkuTKSWLp8Nng4wAi3FRKBWm77PJuvP4SxIKZWVm5CZsaNjFCKjEuclY3yaKWdzRfF kN8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=V+5XuW0q095RQT9nDAtOfRIlV0JU7kVuJ2Ss/INqKP8=; b=b4JlYPuBdsBO2f02LlP34SaQ2GaVIlqNEaihIRWFUx0hlwYziqY6MryEWai8taxWu4 BWxjA4w4q3FW0oN/Bq+UBih5L2d6XoHThIhZj7z+yZl3mVdT231AktyGKhTvUyUtzMmI pnjEz7aqly2cCOCHCJ4SqW5kN/M+b+kkr81g95YSnTUzFuXorf0JFoWY/d/elST4Iz5q C8cPzJIKKAR/+HdHx/LeJ2iG5okB0aEmfWFg/aOkLg0nA62PDi3GTeMMlHqOxZYoDSDa LyTVh9WmSCw8H5nqdH1orQt/joV0SWXEk+cUX1N4x6LegGhmV7kM4W5sJR5w+iCnhafQ IxPw== X-Gm-Message-State: AJcUukdbIzQTV07QdLqXKC20xYc0DKSjwNBVQBumW8UQtu9aS461szgH 58JqeENX+dcthDWd0hkjHc+XdfPVlTs= X-Google-Smtp-Source: ALg8bN7QxJr3qxW49ZUjj1MJsmxBIMiro/hWmN2GW5FU62qTm400KzNriSX9y86XPV9Vw7g8AWUkJg== X-Received: by 2002:adf:ebd0:: with SMTP id v16mr13199579wrn.109.1547196400483; Fri, 11 Jan 2019 00:46:40 -0800 (PST) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Fri, 11 Jan 2019 09:46:39 +0100 Message-Id: <20190111084639.29553-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 11 Jan 2019 08:46:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 11 Jan 2019 08:46:42 +0000 (UTC) for IP:'209.85.221.67' DOMAIN:'mail-wr1-f67.google.com' HELO:'mail-wr1-f67.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.009 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.221.67 mail-wr1-f67.google.com 209.85.221.67 mail-wr1-f67.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] patchew-importer: import Maildir into Patchew before syncing IMAP X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 11 Jan 2019 08:46:48 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This is more effective when the container is stopped and restarted in the middle of an importer run. Previously, all the messages on the IMAP server would be imported again and again, causing sort of a quadratic behavior. Now, instead, the messages are deleted on the maildir as soon as the container is restarted, and the subsequent offlineimap run will both delete them and read new messages. Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng --- scripts/patchew-importer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/patchew-importer b/scripts/patchew-importer index 41e66ba..2e6cf04 100755 --- a/scripts/patchew-importer +++ b/scripts/patchew-importer @@ -108,7 +108,6 @@ offlineimap_import() =20 while :; do $PATCHEW_CLI login "$PATCHEW_USER" "$PATCHEW_PASS" - offlineimap_import while :; do wd=3D$(mktemp -d /var/tmp/patchew-applier.XXXXX) if (cd $wd; $PATCHEW_CLI apply --applier-mode); then @@ -121,5 +120,6 @@ while :; do fi done $PATCHEW_CLI project update + offlineimap_import sleep 60 done --=20 2.20.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel