Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Improve TTC logs #4947

Merged
merged 3 commits into from
Nov 28, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions golem/task/tasksession.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,6 @@ def _offer_chosen( # pylint: disable=too-many-locals
ctd, package_hash, package_size = ctd_res
logger.debug("CTD generated. %s, ctd=%s", task_node_info, ctd)

logger.info(
"Subtask assigned. %s, subtask_id=%r",
task_node_info, ctd["subtask_id"]
)

ttc = message.tasks.TaskToCompute(
compute_task_def=ctd,
want_to_compute_task=msg,
Expand Down Expand Up @@ -467,6 +462,11 @@ def _offer_chosen( # pylint: disable=too-many-locals

self.send(ttc)

logger.info(
"Subtask assigned. %s, subtask_id=%r",
task_node_info, ctd["subtask_id"]
)

history.add(
msg=signed_ttc,
node_id=self.key_id,
Expand Down Expand Up @@ -588,8 +588,15 @@ def _react_to_task_to_compute(self, msg: message.tasks.TaskToCompute):
message=msg
)

logger.info(
"Received subtask. task_id: %r, subtask_id: %r, requestor_id: %r",
ctd["task_id"],
ctd["subtask_id"],
common.short_node_id(msg.requestor_id)
)

def _cannot_compute(reason):
logger.debug("Cannot %r", reason)
logger.info("Cannot compute subtask. reason: %r", reason)
self.send(
message.tasks.CannotComputeTask(
task_to_compute=msg,
Expand Down