Remove unnecessary overload of AsyncTaskEnqueuer.enqueueAsyncResave() (#2083)

It was only called in one place (in actual production code), and it was just
slightly obscuring the fact that re-saves can be scheduled for multiple points
in the future in a way that wasn't amazingly helpful to understanding of the
system logic at the callsite.
This commit is contained in:
Ben McIlwain
2023-07-24 13:37:36 -04:00
committed by GitHub
parent 311d5ac9b6
commit 5f5cb8df9f
3 changed files with 5 additions and 9 deletions
@@ -69,7 +69,7 @@ public class AsyncTaskEnqueuerTest {
void test_enqueueAsyncResave_success() {
Contact contact = persistActiveContact("jd23456");
asyncTaskEnqueuer.enqueueAsyncResave(
contact.createVKey(), clock.nowUtc(), clock.nowUtc().plusDays(5));
contact.createVKey(), clock.nowUtc(), ImmutableSortedSet.of(clock.nowUtc().plusDays(5)));
cloudTasksHelper.assertTasksEnqueued(
QUEUE_ASYNC_ACTIONS,
new CloudTasksHelper.TaskMatcher()
@@ -108,7 +108,7 @@ public class AsyncTaskEnqueuerTest {
void test_enqueueAsyncResave_ignoresTasksTooFarIntoFuture() {
Contact contact = persistActiveContact("jd23456");
asyncTaskEnqueuer.enqueueAsyncResave(
contact.createVKey(), clock.nowUtc(), clock.nowUtc().plusDays(31));
contact.createVKey(), clock.nowUtc(), ImmutableSortedSet.of(clock.nowUtc().plusDays(31)));
cloudTasksHelper.assertNoTasksEnqueued(QUEUE_ASYNC_ACTIONS);
assertLogMessage(logHandler, Level.INFO, "Ignoring async re-save");
}