Skip to content

Commit

Permalink
Update extension point names
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Jul 3, 2023
1 parent c7250ba commit 6a487ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ boolean reschedule(
&& entry.getExtensionUniqueId() != null) {
accessToken = JobSchedulerPlugin.GuiceHolder.getIdentityService()
.getScheduledJobIdentityManager()
.issueAccessTokenOnBehalfOfUser(jobInfo.getJobId(), jobInfo.getIndexName(), Optional.of(entry.getExtensionUniqueId()));
.issueAccessTokenOnBehalfOfOperator(
jobInfo.getJobId(),
jobInfo.getIndexName(),
Optional.of(entry.getExtensionUniqueId())
);
}

// invoke job runner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -231,7 +232,7 @@ public Engine.Index preIndex(ShardId shardId, Engine.Index operation) {

JobSchedulerPlugin.GuiceHolder.getIdentityService()
.getScheduledJobIdentityManager()
.saveUserDetails(operation.id(), shardId.getIndexName(), operator);
.associateJobWithOperator(operation.id(), shardId.getIndexName(), Optional.of(operator));
return newIndex;
} catch (IOException e) {
throw new RuntimeException(e);
Expand Down Expand Up @@ -277,7 +278,7 @@ public void postDelete(ShardId shardId, Engine.Delete delete, Engine.DeleteResul
&& JobSchedulerPlugin.GuiceHolder.getIdentityService().getScheduledJobIdentityManager() != null) {
JobSchedulerPlugin.GuiceHolder.getIdentityService()
.getScheduledJobIdentityManager()
.deleteUserDetails(delete.id(), shardId.getIndexName());
.deleteJobOperatorEntry(delete.id(), shardId.getIndexName());
}
this.scheduler.deschedule(shardId.getIndexName(), delete.id());
lockService.deleteLock(
Expand Down

0 comments on commit 6a487ce

Please sign in to comment.