From nobody Wed Jul 16 03:28:18 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1645525431; cv=none; d=zohomail.com; s=zohoarc; b=lK5zpjxS0eg2MAUQSpwl0gOvFWbUebnHY5zrFu+oyXs0lS7o9PgnmwHuP852lv2G8bDpukdMCtqgyKXJ2CeX5tbB+3BFN6C8TZV2eeu3kIccTfyXioI5sjp5IiALAWDJ+TJxsQKb9Kzol8GHnDheUrOC3c3kIvd92Q49bbEKBso= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645525431; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=If9OevBuZbfVEl9pbcSzfTxEllEHlnKtdSJHaO7XnJE=; b=WLgKqXth7oAGRgaeULTULajo9TYJrCRUk7zB43dglJLFbxjzhsX2N0JYBJhO5tiJKO+k+8XTow8Rv4NtKooiyboC8Vy2+e8T6nAJBXl0SkUXEJama/tti9BofEyDhkNe1yQ1yUZxbeXYiKeHss1BHZGNZXuKxMhQR+uMaue5gD4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1645525431259165.45962942557037; Tue, 22 Feb 2022 02:23:51 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-624-kDHKi40cMdKjy4xV_aH1qg-1; Tue, 22 Feb 2022 05:23:48 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AFCAC425D1; Tue, 22 Feb 2022 10:23:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A85061059108; Tue, 22 Feb 2022 10:23: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 9DAB11809CB2; Tue, 22 Feb 2022 10:23:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21MALSgC017261 for ; Tue, 22 Feb 2022 05:21:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1EDDC78A8D; Tue, 22 Feb 2022 10:21:28 +0000 (UTC) Received: from avogadro.lan (unknown [10.39.195.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86E507A3F3 for ; Tue, 22 Feb 2022 10:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645525431; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=If9OevBuZbfVEl9pbcSzfTxEllEHlnKtdSJHaO7XnJE=; b=f+KeK13/Vn/oO5Aif/bSs6NPQJc9m34ecG3755CRjI6flcliHkoCKuh2tpElpqfqSZmyln SElGnp9jNxQgmZ1DXtatTCfibqu1jz9fNoTctvsmYh7QmhNtNIEQzCDgD1QG3WsP1nzbvN hHfhgzcLlTT93L9CIY/4be1Xs9EgHt8= X-MC-Unique: kDHKi40cMdKjy4xV_aH1qg-1 From: Paolo Bonzini To: patchew-devel@redhat.com Date: Tue, 22 Feb 2022 11:21:24 +0100 Message-Id: <20220222102126.166482-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] maintainer: also remove patches from watched queue on events 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: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1645525459157100001 Content-Type: text/plain; charset="utf-8" --- mods/maintainer.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mods/maintainer.py b/mods/maintainer.py index ec49335..e74b559 100644 --- a/mods/maintainer.py +++ b/mods/maintainer.py @@ -48,19 +48,24 @@ class MaintainerModule(PatchewModule): if created: emit_event("MessageQueued", user=3Duser, message=3Dm, queue=3D= q) =20 + def _drop_all_from_queue(self, query): + for q in query: + emit_event("MessageDropping", user=3Dq.user, message=3Dq.messa= ge, queue=3Dq) + query.delete() + def _drop_from_queue(self, user, m, queue): query =3D QueuedSeries.objects.filter( user=3Duser, message=3Dm, name=3Dqueue ) - for q in query: - emit_event("MessageDropping", user=3Duser, message=3Dq.message= , queue=3Dq) - query.delete() + self._drop_all_from_queue(query) =20 def _update_watch_queue(self, series): se =3D SearchEngine() for wq in WatchedQuery.objects.all(): if se.query_test_message(wq.query, series): self._add_to_queue(wq.user, series, "watched") + else: + self._drop_from_queue(wq.user, series, "watched") =20 def on_result_update(self, evt, obj, old_status, result): if not isinstance(obj, Message): --=20 2.34.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel