From nobody Mon Sep 16 19:29:19 2024 Delivered-To: importer@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=1645604805; cv=none; d=zohomail.com; s=zohoarc; b=e1sbP0rV8tJgcylmNeexinOEgV8A/8s149Y68M+KGyutyzxMK+/VBprHrYAxT8sBhJ0btqOZ4Dgy9V4h+G048Hshh8Kqn3vaKWCA8X5YzmGF8DeUL+5931UTdLnmxRnFB1rRepg9Fftfpgrx4FJxK0tPwg0V2fIMSAMEJ1VhxyE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645604805; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xn7FLuzuzP1+1CSQ3wL4gHbfIdk611oa+zxWKiqN4V4=; b=fRkZtwtcq+Ro9egS6EdXxwD6XQqPaXzkwFhN9mDuen7tJ30UVd/0y45SzIPwUdXp5aQhte7ofY3zRBQ0+8M6AZUij8uhH6+9w7bDNnkZjrVp3w96/O/CFDkW0igBm99LvXpE5ERqLp8qZOldHT5n+vJ/IZQue5F5G4V1bbyU9sE= 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 1645604805840884.0045776341393; Wed, 23 Feb 2022 00:26:45 -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-326-yusU2ZXWMpOoid3gA2x_sA-1; Wed, 23 Feb 2022 03:26:41 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B945C801AAD; Wed, 23 Feb 2022 08:26:40 +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 B0A397FCE8; Wed, 23 Feb 2022 08:26:40 +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 792F24ED28; Wed, 23 Feb 2022 08:26:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21N8Qcqp027995 for ; Wed, 23 Feb 2022 03:26:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4F810492D4C; Wed, 23 Feb 2022 08:26:38 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B1F8492D4A for ; Wed, 23 Feb 2022 08:26:38 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3267D1C05AEF for ; Wed, 23 Feb 2022 08:26:38 +0000 (UTC) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-641-0Sl8rmz_MXyy_5Nt3k_svQ-2; Wed, 23 Feb 2022 03:26:36 -0500 Received: by mail-ed1-f53.google.com with SMTP id q17so43186454edd.4 for ; Wed, 23 Feb 2022 00:26:36 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id s18sm334929eja.87.2022.02.23.00.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 00:26:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645604804; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=xn7FLuzuzP1+1CSQ3wL4gHbfIdk611oa+zxWKiqN4V4=; b=PtxTrCJRKepzQb9t9CXqhobrEdc7EG9SkMkmQibglWd57EAV2BwkSDz8FBcZH2YKKR3pWC QXXvi51i1qQ+sy+OUkOWpxVNEDyu7d9ZQ3KdtcVD6ZZaC1/Cj2XJAaIisAgPoDflYt54qy Dt6L1xJ9cb06K/8Ix2TNb/MTv1wDm/M= X-MC-Unique: yusU2ZXWMpOoid3gA2x_sA-1 X-MC-Unique: 0Sl8rmz_MXyy_5Nt3k_svQ-2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=5H7JdPlEKBRUqs8HX50xm5T8H7G3unjx//Oilngg0Mc=; b=EpAUtjH3PbC8M4sP7sxyu+qcMeMgltce1b8vjCmzDgbk2Xcc/0WFoFK1I9ImFYMjyn rJgP1s5WidU5VeQXaffv09sawPQre12O4xDvaIHDnHyLN6GtAp3F9mSz3QTpKfpofG0w cNa4nkoTdGTI4oa2Tlp1xbPu8IoGadayfYN5RFMJRDyA6rgxgVBhAPhgYAh04P3TKHF6 pGPll2N2G3/ItuDQPbJby7+94gGpbS28W9ZZBEZ1EuVvZ+hysLpu4vTOw7SAwKq3Lakd uY5xp8gcrqxADI9umVCMwmQY306G9P52ap/VrdjwMxOSU2K7sKnCkOLPWJM5ZoSNftPr QXpA== X-Gm-Message-State: AOAM531biaHzuLP6N+T/JCvsY83zVpTpJRkszE+BTfB8com+GUPm3/Fp Ey7fD61h8vjYjnkkLJoA1BJNPehvsAo= X-Google-Smtp-Source: ABdhPJwvtRI7shDjJ1NFY3+bkmeRfrItOdRUbWeyYTWcfIxhaydPW6Gj4M8r4Se0Eep4zcycWY+zLA== X-Received: by 2002:a50:fa9a:0:b0:413:4420:518a with SMTP id w26-20020a50fa9a000000b004134420518amr530199edr.168.1645604796102; Wed, 23 Feb 2022 00:26:36 -0800 (PST) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Wed, 23 Feb 2022 09:26:28 +0100 Message-Id: <20220223082631.228937-4-pbonzini@redhat.com> In-Reply-To: <20220223082631.228937-1-pbonzini@redhat.com> References: <20220223082631.228937-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 3/6] maintainer: update watch query on add/remove to other queues 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.79 on 10.5.11.15 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: 1645604806991100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- mods/maintainer.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mods/maintainer.py b/mods/maintainer.py index 24209c8..3e4ee09 100644 --- a/mods/maintainer.py +++ b/mods/maintainer.py @@ -28,6 +28,8 @@ class MaintainerModule(PatchewModule): =20 def __init__(self): register_handler("ResultUpdate", self.on_result_update) + register_handler("MessageQueued", self.on_queue_change) + register_handler("MessageDropped", self.on_queue_change) register_handler("SeriesMerged", self.on_series_merged) register_handler("SeriesReviewed", self.on_series_reviewed) declare_event( @@ -71,6 +73,11 @@ class MaintainerModule(PatchewModule): else: self._drop_from_queue(wq.user, series, "watched") =20 + def on_queue_change(self, evt, user, message, queue): + # Handle changes to e.g. "-nack:me" + if queue !=3D "watched": + self._update_watch_queue(message) + def on_result_update(self, evt, obj, old_status, result): if not isinstance(obj, Message): return @@ -117,7 +124,7 @@ class MaintainerModule(PatchewModule): r =3D QueuedSeries.objects.filter( user=3Drequest.user, message=3Dmsg, name__in=3D["accept", "rej= ect"] ) - r.delete() + self._drop_all_from_queue(r) return HttpResponseRedirect(request.META.get("HTTP_REFERER")) =20 def _update_merge_state(self, request, message_id, is_merged): --=20 2.34.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel