Framework’ü başlat

EH Forwarder Bot, sistemi başlatmak için 2 yol önerdi:

  • ehforwarderbot

  • python3 -m ehforwarderbot

Her iki komut da tam olarak aynı şeydir, aynı bayrakları kabul eder, aynı kodu çalıştırır. İkincisi yalnızca ilkinin çalışmaması durumu için bir yedektir.

Seçenekler

  • -h, --help: Yardım mesajını göster

  • -p PROFILE, --profile PROFILE: Switch profile

    Sürüm 2’de EFB, profilleri tarafından tanımlanan aynı kullanıcı altındaki farklı örnekleri çalıştırmayı desteklemektedir. Varsayılan profile default adı verilir.

  • -V, --version: Sürüm bilgilerini yazdır

    Bu, kullandığınız Python’un sürüm numarasını, EFB yapısını, tüm kanalları ve özel yazılımları etkinleştirildiğini gösterir.

  • -v, --verbose: Ayrıntılı günlüğü yazdır

    This option enables verbose log of EFB and all enabled modules. This, together with --version, is particularly useful in debugging and issue reporting.

  • --trace-threads: Trace hanging threads

    This option is useful to identify source of the issue when you encounter situations where you had to force quit EFB. When this option is enabled, once the first stop signal (SIGINT or SIGTERM) is sent, threads that are asleep will be identified and reported every 10 seconds, until a second stop signal is seen.

    In order to use this option, you need to install extra Python dependencies using the following command.

    pip3 install 'ehforwarderbot[trace]'
    

Quitting EFB

If you started EFB in a shell, you can simply press Control-c to trigger the quit process. Otherwise, ask your service manager to issue a SIGTERM for a graceful exit. The exit process may take a few second to complete.

Önemli

It is important for you to issue a graceful termination signal (e.g. SIGTERM), and NOT to use SIGKILL. Otherwise you may face the risk of losing data and breaking programs.

If you have encountered any issue quitting EFB, press Control-c for 5 times consecutively to trigger a force quit. In case you have frequently encountered situations where you had to force quit EFB, there might be a bug with EFB or any modules enabled. You may want to use the --trace-threads option described above to identify the source of issue, and report this to relevant developers.