Common: Use int instead of UUID in AbstractAgentEvent

This commit is contained in:
Kekoa Kaaikala 2022-09-09 17:43:35 +00:00 committed by Ilija Lazoroski
parent bde44f74f5
commit 78d5094f90
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ from abc import ABC
from dataclasses import dataclass, field
from ipaddress import IPv4Address
from typing import FrozenSet, Union
from uuid import UUID, getnode
from uuid import getnode
@dataclass(frozen=True)
@ -22,7 +22,7 @@ class AbstractAgentEvent(ABC):
:param tags: The set of tags associated with the event
"""
source: UUID = field(default_factory=getnode)
target: Union[UUID, IPv4Address, None] = field(default=None)
source: int = field(default_factory=getnode)
target: Union[int, IPv4Address, None] = field(default=None)
timestamp: float = field(default_factory=time.time)
tags: FrozenSet[str] = field(default_factory=frozenset)