Sha256: da3c7997d7f9a1eeb00c54b44c2453fdae4bebdfdf8f86e7d11b0522cd746df5
Contents?: true
Size: 444 Bytes
Versions: 20
Compression:
Stored size: 444 Bytes
Contents
class Sneakers::Utils def self.make_worker_id(namespace) "worker-#{namespace}:#{'1'}:#{rand(36**6).floor.to_s(36)}" # jid, worker id. include date. end def self.parse_workers(workerstring) missing_workers = [] workers = (workerstring || '').split(',').map do |k| begin w = Kernel.const_get(k) rescue missing_workers << k end w end.compact [workers, missing_workers] end end
Version data entries
20 entries across 20 versions & 2 rubygems