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=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by gnuweeb.org (Postfix) with ESMTPSA id 1C6AB7E443 for ; Wed, 4 Jan 2023 07:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1672815753; bh=EOlh8qk6deCfM7hCnIPbWC5oo9zNp5JcWbLoiEsLtdA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bzRoZYHF84KIO3aoCUvLSSiDiXICzfgoMhgYCoz+UFVBb67gVtoK7FAI5YQxxgyAx AL2xG8MNbgqbxULx35km2PXeJNDOm9K9PjA0qPMrgHD4QbW9hVa5/PSFNmYJg4A/yN AArcULni9uXHc8fjBbwgzAYPGrv794MZJXBayrChGo0hnQm78wdby23ZaHpFcTSodt i37chPOtgDR9jdgZ7BAXhZ7rAP+VE8GSkwsg0TXi6nanTROnhlNj49j9OlNW/TDBF1 1B3119t4WRb6lAnpNiDZohDI4RtEkjLiCkM+jObHz6RXDI3CIkqg+k4Wglif1HNnj1 1tiif5ta3z8Iw== Received: by mail-lj1-f169.google.com with SMTP id s25so34560918lji.2 for ; Tue, 03 Jan 2023 23:02:32 -0800 (PST) X-Gm-Message-State: AFqh2koJqZ3n07jWgwbgnJ5X6M7+c6/WHHZxi0bp8ciSZL5cmr9P5Pre eRZxxlFcwCrF+74qF1xwNtGGG6VpmQXGiDqhwf4= X-Google-Smtp-Source: AMrXdXuqn4dDCgMX2ekzbR+OgUtkWp/xu9McG4Pc8MHBVFWlhdVapHLBvXC/ecTXDUk8ft1TtoO9G5QlNh0V6W7kM/c= X-Received: by 2002:a2e:9083:0:b0:27f:c245:90c3 with SMTP id l3-20020a2e9083000000b0027fc24590c3mr1016387ljg.174.1672815751136; Tue, 03 Jan 2023 23:02:31 -0800 (PST) MIME-Version: 1.0 References: <20230103063641.1680-1-kiizuha@gnuweeb.org> <20230103063641.1680-4-kiizuha@gnuweeb.org> <5fa120d7-32ab-b560-0c8f-0da64546cf0b@gnuweeb.org> In-Reply-To: From: Alviro Iskandar Setiawan Date: Wed, 4 Jan 2023 14:02:19 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 03/13] refactor(telegram)!: Ensure the Telegram bot has been started To: Ammar Faizi Cc: Muhammad Rizki , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" List-Id: On Wed, Jan 4, 2023 at 1:50 PM Ammar Faizi wrote: > I'm fine with this, but from I understand, there are two different > issues: > > 1. Wrong ordering between 'client.start()' and 'sched.start()'. > 'client.start()' has to be called first because if an error > happens before the report functional gets started, we won't get > the report. > > 2. Missing 'client.stop()' (IOW, missing graceful exit handler). > > Calling 'client.start()' before 'sched.start()' fixes the former issue. > But the 'idle()' call fixes the later issue. That's why I'm asking to > have a separate patch for it. See what I'm saying? Or did I miss > something very clear here? I think we don't actually care with the former issue because it's at initialization, if the initialization fails, something has gone wrong at a fatal level and needs to be fixed immediately. No one needs the file report when it happens. So the subject itself should say: telegram: Perform graceful exit when interrupted by a signal and then the changelog explains the need of calling idle() and client.stop(). Not the ordering issue.