FirebaseExtended / firebase-queue

MIT License
787 stars 108 forks source link

Removing Race Condition #2

Closed cbraynor closed 9 years ago

cbraynor commented 9 years ago

Attempting to remove the race condition whereby a single job can claim more than one item while the transactions are being processed

@mattse can we test this with your example, and if it works merge it in

m-tse commented 9 years ago

@drtriumph I think the race condition is still there for when no job is defined, but it seems fixed for when there is a job defined.

To repro:

I'm looking into why it's still broken. Let me know if you can't repro it.

cbraynor commented 9 years ago

@mattse I can't seem to reproduce the error. I did do some linting and some minor variable refactoring that included a name change for the processTimeout function that had to become resetItem because it wasn't just used in timeouts anymore - with a corresponding log change. I also fixed a small issue where it wasn't reporting the completion of a job that was removed when it finished

cbraynor commented 9 years ago

Oh, and I removed the need / check for an authenticated reference - it was a legacy from when I used the UID of the access token to specify the job ID

m-tse commented 9 years ago

I was about to bring up "removal of required authenticated reference," but you already did it :) Just another "reduce friction, get running ASAP" point.

LGTM, merging