Key value checking when saving job data #51375
Replies: 3 comments 2 replies
-
you should not store data subject to change in a job. That is my idea of it. Although I sometimes do, but it's more a matter of putting the job back on the queue, for continuing processing it at a later time. |
Beta Was this translation helpful? Give feedback.
-
@henzeb I can give you an example like this.You have a specific list of products.You are checking for price or stock changes on these products.You cannot employ more than one worker on jobs because of a deadlock. With FIFO logic, only one worker works.After a certain period of time, the job count in the queue becomes overloaded.I do not want it to be used with old data in a job that has been waiting for a long time. I would be very happy if you suggest a different solution to this issue :) |
Beta Was this translation helpful? Give feedback.
-
I would also like to point out this additionally.I have a wide variety of clients. I have to constantly check their product lists at 10-minute intervals.Each job has its own special queue and table.In order not to put too much load on the RAM, I queue them and check them one by one. |
Beta Was this translation helpful? Give feedback.
-
If the payload value of a data set previously added to the queue does not appear to be the same, I want to update the content.
I tried to create a similar structure with the code below.
Job:
Class:
If there is a job waiting in the queue for a long time, isn't there an easy way to update it with new data?
Beta Was this translation helpful? Give feedback.
All reactions