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 <pbonzini@redhat.com>
---
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()
while :; do
$PATCHEW_CLI login "$PATCHEW_USER" "$PATCHEW_PASS"
- offlineimap_import
while :; do
wd=$(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
--
2.20.1
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel
> On Jan 11, 2019, at 16:46, Paolo Bonzini <pbonzini@redhat.com> wrote: > > 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. Yes, good idea! Reviewed-by: Fam Zheng <fam@euphon.net> > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > 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() > > while :; do > $PATCHEW_CLI login "$PATCHEW_USER" "$PATCHEW_PASS" > - offlineimap_import > while :; do > wd=$(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 > -- > 2.20.1 > > _______________________________________________ > Patchew-devel mailing list > Patchew-devel@redhat.com > https://www.redhat.com/mailman/listinfo/patchew-devel _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel
© 2016 - 2024 Red Hat, Inc.