Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bot statistics enabled by default cause performance drop, disabling them is not possible #2103

@ghost

Description

If the value of parameter statistics_host is null, the following exception is thrown:

    self.instance = bot(bot_id, disable_multithreading=True)
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 1164, in __init__
    super().__init__(bot_id=bot_id)
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 239, in __init__
    ttl=None,
  File "/usr/lib/python3/dist-packages/intelmq/lib/cache.py", line 27, in __init__
    if host.startswith("/"):
AttributeError: 'NoneType' object has no attribute 'startswith'

null should be handled gracefully (i.e. no statistics be written)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcomponent: core

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions