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.2] (unknown [182.253.183.90]) by gnuweeb.org (Postfix) with ESMTPSA id D6319804D1; Fri, 28 Oct 2022 19:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1666985903; bh=6uFZfEDZT4w/lg9zBOaUHzr2fVXMeo8C6lHasme2n38=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=lYEuoOuwYQNwXQKViIg/SB3sDz4fSnCfqV3XsXZuLXELgwdQ1HPLy+ZuZ6chq4z1O iaYmw7GIlQc4NRlxSBVlalWF5PuHHY7c3u8UfndPOx30DdERS6Xz4COjj84/59Bn3P lnNJFyDQlPmBlDyTXqiMToxP1gXO+353XoC3txol0g/KfDMflUK3A41pW1BtMrtmck CUk5Kv8dNrkqVibFZOBPCUuqmBTfluov1vtl6MO1oAqsb+EcWN3NOcTKW5kJaLUGNs W1r9tgRp5I0+qeoIXKg/DdI2ERU1VTzsqzI9EcWk6i6rIPfYui+Mud+55UZ4w+XVZ0 2hmoHBtwOna6g== Message-ID: <9c25d0e2-5009-cca2-3f30-b9c584d36789@gnuweeb.org> Date: Sat, 29 Oct 2022 02:38:19 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v1 2/2] daemon: telegram: Handle MySQL error Content-Language: en-US From: Ammar Faizi To: Alviro Iskandar Setiawan , Muhammad Rizki Cc: GNU/Weeb Mailing List References: <20221027150823.601914-1-ammarfaizi2@gnuweeb.org> <20221027150823.601914-3-ammarfaizi2@gnuweeb.org> <1d500d37-b11b-75fd-38e5-d7f8e0a9b1d4@gnuweeb.org> <3a79a587-ddee-9e25-2ac5-b573938b44a9@gnuweeb.org> <043f55c3-67d8-9130-aca4-73c59926d2af@gnuweeb.org> <63aa1b63-f7e2-8da3-b16d-0c7e1045d697@gnuweeb.org> <9ecfe8ab-fa5a-d01a-0b68-bc639f14888f@gnuweeb.org> <54c6d514-f8b3-f8bc-f98b-28a1400fac84@gnuweeb.org> <70c6d919-ed0f-d79c-90fa-d689ed2bbd6f@gnuweeb.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: On 10/29/22 2:36 AM, Ammar Faizi wrote: > On 10/29/22 2:34 AM, Ammar Faizi wrote: >> On 10/29/22 2:29 AM, Alviro Iskandar Setiawan wrote: >>> On Sat, Oct 29, 2022 at 2:15 AM Muhammad Rizki wrote: >>>> Sorry, you mention remove_patch() which function from? Telegram bot >>>> listener __send_mail() ? if yes, that function is already handled by >>>> mutex, see it on telegram/mailer/listener.py of __handle_mail(), in line >>>> 77 it is already hold. >>> >>> Is this function only called from one place? >>> If that's a guarantee, I'm fine with that. But why delete all files, >>> it's the caller's problem that it doesn't call the function properly. >> >> It's also called from daemon/telegram/packages/client.py. >> >> That place doesn't hold the mutex anyway. > > Correction, that place may hold or may not hold the mutex, depending > where they are called. Another place that calls the remove_patch() is > >    daemon/telegram/packages/plugins/commands/scrape.py > > This one always doesn't hold the mutex. I think deleting all files doesn't make so much sense to me. Just delete the specific created file only. Why you can't do that? Rizki, any comment? -- Ammar Faizi