Skip to content
Snippets Groups Projects
Commit e2409dfc authored by Neelesh Thakur's avatar Neelesh Thakur
Browse files

Merge branch 'reindex-auth' into 'master'

refresh auth token on long running reindex request

See merge request !209
parents 9adee383 090fa6d6
No related branches found
No related tags found
1 merge request!209refresh auth token on long running reindex request
Pipeline #68683 failed
......@@ -46,6 +46,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.opengroup.osdu.core.common.model.http.DpsHeaders.AUTHORIZATION;
@Log
@Component
@RequestScope
......@@ -68,6 +70,9 @@ public class IndexerQueueTaskBuilderAzure extends IndexerQueueTaskBuilder {
@Inject
private StorageService storageService;
@Inject
private RequestInfoImpl requestInfo;
@Override
public void createWorkerTask(String payload, DpsHeaders headers) {
createTask(payload, headers);
......@@ -103,6 +108,8 @@ public class IndexerQueueTaskBuilderAzure extends IndexerQueueTaskBuilder {
try {
do {
headers.put(AUTHORIZATION, this.requestInfo.checkOrGetAuthorizationHeader());
if (recordQueryResponse != null) {
recordReindexRequest = RecordReindexRequest.builder().cursor(recordQueryResponse.getCursor()).kind(recordKind).build();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment