You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a quite weird question but it actually exists in my program. I'm designing a eBay like system, and the logic is that:
When users makes an order, they are required to pay within 30 minutes. Otherwise the order will be closed and the user cannot pay it anymore.
I'm using a delayed job to realize this. Whenever an order is made, a job with 1800 seconds delay is generated. And if the user doesn't pay with 1800s, the job will be consumed to a python script, which marks the order as closed in database and notified the user.
But normally, 80% of the orders will be paid with in 1800s. Thus without these delayed jobs being deleted, 80% of the python computation is meaningless, and at least one mysql query will be executed for each job.
What I want to know, is how to actively delete the specific delayed job stored in an tube in my order logic. Like when the user finished the payment process, the delayed job will be deleted.
The text was updated successfully, but these errors were encountered:
It's a quite weird question but it actually exists in my program. I'm designing a eBay like system, and the logic is that:
When users makes an order, they are required to pay within 30 minutes. Otherwise the order will be closed and the user cannot pay it anymore.
I'm using a delayed job to realize this. Whenever an order is made, a job with 1800 seconds delay is generated. And if the user doesn't pay with 1800s, the job will be consumed to a python script, which marks the order as closed in database and notified the user.
But normally, 80% of the orders will be paid with in 1800s. Thus without these delayed jobs being deleted, 80% of the python computation is meaningless, and at least one mysql query will be executed for each job.
What I want to know, is how to actively delete the specific delayed job stored in an tube in my order logic. Like when the user finished the payment process, the delayed job will be deleted.
The text was updated successfully, but these errors were encountered: