Reputation: 13283
Can I set a minimum time before a task is fetched from the task queue? I want to process a task after X days e.g. Is there a simple way or should I put this information it the task itself? It sounds inefficient to load all the tasks every 2 hours (e.g. with a cron job) if most of then should only be executed in 3 days.
Upvotes: 0
Views: 115
Reputation: 10504
You can set etaMillis
or countdownMillis
in TaskOptions
.
No worker should be allowed to lease the tasks before the specific time is elapsed as shown in the Task Queue Python documentation:
Argument: countdown
Functionality in Pull Queues: Designates how long to wait, in seconds, before allowing the task to be leased.
Argument: eta
Functionality in Pull Queues: Designates the earliest time that a worker can lease a task. No worker can lease a task
Upvotes: 1