dmitry-ivanov / laravel-console-mutex

Mutex for Laravel Console Commands.
MIT License
139 stars 31 forks source link

Lock files remain in storage #27

Closed anabeto93 closed 2 years ago

anabeto93 commented 2 years ago

Versions:

Description:

This is not exactly BUG but I haven't seen the option to open a discussion. Just a minor change to the docs to indicate it works with sqlite too.

Have been able to use it with sqlite while testing and I've noticed the lock files remain when tests are completed. I'm wondering if they'd have to be cleaned up aftewards?

Evidence

confirm_mutex_works

dynamic_strategy_based_on_env

not_deleted_when_done

dmitry-ivanov commented 2 years ago

Hi @anabeto93,

Just a minor change to the docs to indicate it works with sqlite too.

The sqlite is not supported.

If you set strategy to sqlite (or any other unknown strategy) - it would simply fall back to the default file strategy.

Have been able to use it with sqlite while testing and I've noticed the lock files remain when tests are completed. I'm wondering if they'd have to be cleaned up afterward?

No, when you use the file strategy (which you do), the lock files remain after releasing the lock.

That's how the underlying lock function works.

See #4 and #8 related to the same question.

Hope it helps! Thanks!