mirror of
https://github.com/google/nomulus
synced 2026-02-07 05:21:15 +00:00
Add asynchronous scheduled actions to re-save entities
This is used in the domain transfer and delete flows, both of which are asynchronous flows that have implicit default actions that will be taken at some point in the future. This CL adds scheduled re-saves to take place soon after those default actions would become effective, so that they can be re-saved quickly if so. Unfortunately the redemption grace period on our TLDs is 35 days, which exceeds the 30 day maximum task ETA in App Engine, so these won't actually fire. That's fine though; the deletion is actually effective as of 5 days, and this is just removing the grace period. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201345274
This commit is contained in:
@@ -14,11 +14,12 @@
|
||||
|
||||
package google.registry.flows.async;
|
||||
|
||||
import static com.google.appengine.api.taskqueue.QueueFactory.getQueue;
|
||||
import static google.registry.flows.async.AsyncFlowEnqueuer.QUEUE_ASYNC_ACTIONS;
|
||||
import static google.registry.flows.async.AsyncFlowEnqueuer.QUEUE_ASYNC_DELETE;
|
||||
import static google.registry.flows.async.AsyncFlowEnqueuer.QUEUE_ASYNC_HOST_RENAME;
|
||||
|
||||
import com.google.appengine.api.taskqueue.Queue;
|
||||
import com.google.appengine.api.taskqueue.QueueFactory;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import javax.inject.Named;
|
||||
@@ -27,15 +28,21 @@ import javax.inject.Named;
|
||||
@Module
|
||||
public final class AsyncFlowsModule {
|
||||
|
||||
@Provides
|
||||
@Named(QUEUE_ASYNC_ACTIONS)
|
||||
static Queue provideAsyncActionsPushQueue() {
|
||||
return getQueue(QUEUE_ASYNC_ACTIONS);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Named(QUEUE_ASYNC_DELETE)
|
||||
static Queue provideAsyncDeletePullQueue() {
|
||||
return QueueFactory.getQueue(QUEUE_ASYNC_DELETE);
|
||||
return getQueue(QUEUE_ASYNC_DELETE);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Named(QUEUE_ASYNC_HOST_RENAME)
|
||||
static Queue provideAsyncHostRenamePullQueue() {
|
||||
return QueueFactory.getQueue(QUEUE_ASYNC_HOST_RENAME);
|
||||
return getQueue(QUEUE_ASYNC_HOST_RENAME);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user