Skip to content

Conversation

qschmick
Copy link
Member

Refactored firstOrCreateByProcess to wrap entire process in lock via the block process

quentin.schmick added 2 commits February 24, 2022 12:12
…CreateByProcess to wrap entire process in cache
…CreateByProcess to wrap entire process in cache
@qschmick qschmick added the enhancement New feature or request label Feb 24, 2022
@qschmick qschmick self-assigned this Feb 24, 2022
@qschmick qschmick requested a review from solflare February 24, 2022 17:23
}

$lock = Cache::lock('process-stamps-hash-create-' . $hash, 12);
$lock->block(3);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember trying something like this before and we ran into deadlocks but I was never able to reproduce it. I think it had something to do with Observers 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants