From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [10.7.7.5] (unknown [182.253.183.184]) by gnuweeb.org (Postfix) with ESMTPSA id 9F5C47E3B8; Tue, 3 Jan 2023 07:14:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1672730071; bh=zFKBCZfLdvp6zNCJE7UiNJxEPlShpnptSUoN5SnrqiY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=k9LrNTF4gCPUiyIkZSzB/jIaDiuRnX0/8sI97sZEMex8L/5CBPDFnkcIzODQOU4NA KVDBiF7WWR63+rmb4CbBdsTiypNrp/ribD1zDl7j+PubFdprc9Yvc82SOXFD3NvnOk 4epK3MPbpoSgpz+aiExBYsbAR1Saw5SB0HJpaUi3bdmA/4gs+yql+G2SrJzXxzLBII 11A5h+q2THwrDQNZbmHci18oI/j+5Neh86qCwT8V2+oZixje0115fPMDFBcEhgZXrM riUMrn1y7I7dqNnIx7Nf0kovhM2ztIFXenPPL5fXxvis4MjczVckB8XUAEwiZA4qYQ uHzSTeNdDjjbA== Message-ID: Date: Tue, 3 Jan 2023 14:14:28 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v1 08/13] feat(discord): Implement the report_err() Content-Language: en-US To: Muhammad Rizki Cc: Alviro Iskandar Setiawan , GNU/Weeb Mailing List References: <20230103063641.1680-1-kiizuha@gnuweeb.org> <20230103063641.1680-9-kiizuha@gnuweeb.org> From: Ammar Faizi In-Reply-To: <20230103063641.1680-9-kiizuha@gnuweeb.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 1/3/23 1:36 PM, Muhammad Rizki wrote: > --- a/daemon/dscord/mailer/listener.py > +++ b/daemon/dscord/mailer/listener.py > @@ -51,8 +51,13 @@ class Listener: > > async def __run(self): > self.logger.info("Running...") > - for url in self.db.get_atom_urls(): > - await self.__handle_atom_url(url) > + url = None > + > + try: > + for url in self.db.get_atom_urls(): > + await self.__handle_atom_url(url) > + except: > + await self.client.report_err(url) Why don't you implement the same custom exception for Discord? The exception issue when reporting the corresponding URL also exists on the Discord daemon too. Yes? No? -- Ammar Faizi