erlangpack / bcrypt

Erlang wrapper for OpenBSD's Blowfish password hashing code
https://hex.pm/packages/bcrypt
Other
16 stars 19 forks source link

Add workers_available/0 fun #40

Closed varnerac closed 1 year ago

varnerac commented 1 year ago

Adds a workers_available/0 function to detect if there are bcrypt (nif or port) available. This function is useful for load shedding.

mworrell commented 1 year ago

Hi, nice addition and clean implementation.

One question, could we call it is_worker_available/0 ? Then it is clear that we expect a boolean result.

varnerac commented 1 year ago

I'll make that change.

varnerac commented 1 year ago

Pushed with associated doc changes

mworrell commented 1 year ago

Great work, thank you!