@Stratus3D the unique_key option was added so that we can track jobs by giving it our own unique key. So for xyz.com:123abc, where xyz.com is the facet and123abc is the unique key (and the ID of an item in our db), we know that the item ID being processed is 123abc for the xyz.com site.
As a good side-effect, I later realized that if I use the nx option when inserting a key along with the unique_key option, then I could avoid jobs running for the same item at the same time.
I don’t understand how this could work:
get_lockalways returnsSecureRandom.hex(5)from what I tell.@Stratus3D the
unique_keyoption was added so that we can track jobs by giving it our own unique key. So forxyz.com:123abc, wherexyz.comis the facet and123abcis the unique key (and the ID of an item in our db), we know that the item ID being processed is123abcfor thexyz.comsite.As a good side-effect, I later realized that if I use the
nxoption when inserting a key along with theunique_keyoption, then I could avoid jobs running for the same item at the same time.