-
Notifications
You must be signed in to change notification settings - Fork 16
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
Manage upload to ipfs #230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great one, just tiny issues :)
@@ -346,10 +360,24 @@ private boolean isTaskStatusFailOnChain(String chainTaskId, String walletAddress | |||
} | |||
} | |||
|
|||
boolean isPublicResult(String chainTaskId, Integer chainId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move isPublicResult
to common? (We're gonna need it for the seperate Result Repo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, moved to common.
boolean isPublicResult(String chainTaskId) { | ||
return isPublicResult(chainTaskId, 0); | ||
} | ||
|
||
boolean isPublicResult(String chainTaskId, Integer chainId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a duplicate here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
return Optional.empty(); | ||
} | ||
|
||
public boolean doesContentExists(String ipfsHash) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesContentExist* (no 's')!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, changed.
@@ -170,6 +169,16 @@ private int getNbReplicatesWithGivenStatusJustBeforeWorkerLost(String chainTaskI | |||
return Optional.empty(); | |||
} | |||
|
|||
public Optional<Replicate> getReplicateWithResultUploadedStatus(String chainTaskId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we have an issue when worker is lost after UPLOADED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private int getNbReplicatesWithGivenStatusJustBeforeWorkerLost(String chainTaskId, ReplicateStatus status) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch, thanks! I've modified the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for the changes!
The idea here is to publish the results depending on the beneficiary of the task:
Some refactoring will be needed to split the replicate update status into several entrypoints instead of a single one at the moment.