Reputation: 1259
I am working on an application where I have to send notification to the users regarding some job, and user has to accept the job within 1 minute, if he doesn't, the job's request should be sent to the next user.
I am using firestore as a database. When I create a job, trigger will send notification to the assigned user. Now I have to wait for 60 seconds to confirm if user has accepted the job and started the procedure, if not I have to assign that job to the new user.
I am not sure how I can create such procedure where cloud functions are executed post delayed.
Example: First execution will be done by trigger, and it will order for second execution after 60 seconds. Second execution checks if job is accepted, if so it will terminate and demands no post delayed execution, if job is not accepted, it will repeat the procedure of first execution and request for third execution after 60 seconds.
What are the available resources in google cloud to achieve this?
Thanks
Upvotes: 0
Views: 1348
Reputation: 317467
You can use Cloud Tasks to schedule a delayed call back to a Cloud Function.
Upvotes: 5