Skip to content
Permalink
Browse files
Async gremlin task doesn't need to optimize (#285)
  • Loading branch information
Linary committed Jan 4, 2021
1 parent 43c7d58 commit 7a3efa096384abef7923824ace6e943b4eb8f6bd
Showing 2 changed files with 4 additions and 6 deletions.
@@ -105,8 +105,8 @@ public ExecuteStatus executeAsyncTask(@PathVariable("connId") int connId,
ExecuteStatus status = ExecuteStatus.ASYNC_TASK_RUNNING;
ExecuteHistory history;
history = new ExecuteHistory(null, connId, 0L, ExecuteType.GREMLIN_ASYNC,
query.getContent(), status, AsyncTaskStatus.UNKNOWN,
-1L, createTime);
query.getContent(), status,
AsyncTaskStatus.UNKNOWN, -1L, createTime);
this.historyService.save(history);

StopWatch timer = StopWatch.createStarted();
@@ -129,11 +129,9 @@ public GremlinResult executeQuery(int connId, GremlinQuery query) {
public Long executeAsyncTask(int connId, GremlinQuery query) {
HugeClient client = this.getClient(connId);

log.debug("The original gremlin ==> {}", query.getContent());
String gremlin = this.optimize(query.getContent());
log.debug("The optimized gremlin ==> {}", gremlin);
log.debug("The async gremlin ==> {}", query.getContent());
// Execute optimized gremlin query
GremlinRequest request = new GremlinRequest(gremlin);
GremlinRequest request = new GremlinRequest(query.getContent());
return client.gremlin().executeAsTask(request);
}

0 comments on commit 7a3efa0

Please sign in to comment.