Commit 35a7056c authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

driver: move drop PendingRequest creation timestamp as argument

parent dc319385
Pipeline #15163 failed with stages
in 1 minute and 10 seconds
......@@ -15,7 +15,6 @@ import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.URI;
import java.net.UnknownHostException;
import java.time.Instant;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
......@@ -196,7 +195,7 @@ public class CtaNearlineStorage implements NearlineStorage {
);
var cancelRequest = ctaRequestFactory.cancelValueOf(ar, response);
pendingRequests.put(id, new PendingRequest(Instant.now(), r) {
pendingRequests.put(id, new PendingRequest(r) {
@Override
public void cancel() {
// on cancel send the request to CTA; on success cancel the requests
......@@ -278,7 +277,7 @@ public class CtaNearlineStorage implements NearlineStorage {
response.getReqId()
);
var cancelRequest = ctaRequestFactory.cancelValueOf(rr, response);
pendingRequests.put(id, new PendingRequest(Instant.now(), r) {
pendingRequests.put(id, new PendingRequest(r) {
@Override
public void cancel() {
// on cancel send the request to CTA; on success cancel the requests
......
......@@ -20,8 +20,8 @@ public class PendingRequest {
*/
private final NearlineRequest request;
public PendingRequest(Instant submissionTime, NearlineRequest request) {
this.submissionTime = submissionTime;
public PendingRequest(NearlineRequest request) {
this.submissionTime = Instant.now();
this.request = request;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment