forked from p15670423/monkey
Agent: Add log statements in class `push_all_events_to_island`'s `__call__()`
This commit is contained in:
parent
1462e832b0
commit
a06c6a622e
|
@ -16,9 +16,13 @@ class push_all_events_to_island:
|
||||||
self._server_address = server_address
|
self._server_address = server_address
|
||||||
|
|
||||||
def __call__(self, event: AbstractAgentEvent, topic=pub.AUTO_TOPIC):
|
def __call__(self, event: AbstractAgentEvent, topic=pub.AUTO_TOPIC):
|
||||||
|
topic_name = topic.getName()
|
||||||
|
|
||||||
|
logger.debug(f"Pushing event of type {topic_name} to the Island at {self._server_address}")
|
||||||
|
|
||||||
requests.post( # noqa: DUO123
|
requests.post( # noqa: DUO123
|
||||||
"https://%s/api/events" % (self._server_address,),
|
"https://%s/api/events" % (self._server_address,),
|
||||||
data=self._serialize_event(event, topic.getName()),
|
data=self._serialize_event(event, topic_name),
|
||||||
headers={"content-type": "application/json"},
|
headers={"content-type": "application/json"},
|
||||||
verify=False,
|
verify=False,
|
||||||
timeout=MEDIUM_REQUEST_TIMEOUT,
|
timeout=MEDIUM_REQUEST_TIMEOUT,
|
||||||
|
|
Loading…
Reference in New Issue