Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: extended deal info #386

Merged
merged 4 commits into from
Jan 18, 2018
Merged

Feature: extended deal info #386

merged 4 commits into from
Jan 18, 2018

Conversation

nikonov1101
Copy link
Member

The deal status handle now can show extended info, that fetched from the Hub.

If a Deal was not accepted (there is no info about the Hub) - show only a Deal info (previous behavior)
If the Hub is associated with a Deal - the Node will try to connect to the Hub and retrieve the details (resources from the Order, running tasks, finished tasks)

BTW:

  • dealInfo struct became unused and was removed;
  • error checking for a hub.deleteTask(id) was added;

@nikonov1101 nikonov1101 force-pushed the feature/extend-deal-info branch 2 times, most recently from c4bd427 to 90e48df Compare January 17, 2018 11:58
Copy link
Member

@3Hren 3Hren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor issues, sorry for long review.

h.deleteTask(task.ID)
err = h.deleteTask(task.ID)
if err != nil {
log.G(ctx).Warn("cannot delete task", zap.Error(err))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error, because we break the request on this.

taskDetails, err := mctx.Client.TaskDetails(ctx, &pb.ID{Id: t.ID})
if err != nil {
log.G(h.ctx).Warn("cannot get task status",
zap.String("worker_id", t.MinerId), zap.String("task_id", t.ID), zap.Error(err))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we use camelCase in log attribute names.

@3Hren 3Hren merged commit c00f758 into master Jan 18, 2018
@3Hren 3Hren deleted the feature/extend-deal-info branch January 18, 2018 11:39
@3Hren 3Hren mentioned this pull request Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants