Skip to content

Commit

Permalink
add delay to task queuer for indexing account request (#12936)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas <25302138+NicolasCwy@users.noreply.github.com>
  • Loading branch information
cedricongjh and NicolasCwy committed Mar 25, 2024
1 parent 7ba20fc commit 1be2adb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/teammates/logic/api/TaskQueuer.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ public void scheduleAccountRequestForSearchIndexing(String email, String institu
paramMap.put(ParamsNames.INSTRUCTOR_EMAIL, email);
paramMap.put(ParamsNames.INSTRUCTOR_INSTITUTION, institute);

addTask(TaskQueue.SEARCH_INDEXING_QUEUE_NAME, TaskQueue.ACCOUNT_REQUEST_SEARCH_INDEXING_WORKER_URL,
paramMap, null);
// TODO: change the action CreateAccountRequestAction to call scheduleAccountRequestForSearchIndexing
// after AccountRequest is inserted in the DB
addDeferredTask(TaskQueue.SEARCH_INDEXING_QUEUE_NAME, TaskQueue.ACCOUNT_REQUEST_SEARCH_INDEXING_WORKER_URL,
paramMap, null, 60);
}

/**
Expand Down

0 comments on commit 1be2adb

Please sign in to comment.