ruby-gpgme
ruby-gpgme copied to clipboard
GPGME::Error Bad file descriptor using GPGME::Key.find
I'm using ruby 2.5.0
and gpgme 2.0.16
with rails and sidekiq. I'm spinning up about 40 GPG decryption jobs, processing about 10 jobs (using threads) * 3 processes concurrently.
Searching for a private key randomly raises GPGME::Error Bad file descriptor
randomly in my jobs:
return unless GPGME::Key.find(:secret, PRIVATE_KEY_SHA).empty?
Two questions:
When would using GPGME::Key.find
trigger this error?
Is this gem thread-safe?
Any insight would be much appreciated.