Sha256: 64b23d9133ae7279ed9380ecc5c9467b4b78e77a0e64b67e6d843af18e5ac0a0
Contents?: true
Size: 677 Bytes
Versions: 16
Compression:
Stored size: 677 Bytes
Contents
module Kuroko2 module Workflow module Task class Queue < Base def execute if option.present? token.context['QUEUE'] = option else token.context['QUEUE'] = Execution::DEFAULT_QUEUE end :next end def validate unless /\A\@?[\w-]{1,180}\z/ === option raise Workflow::AssertionError, "Queue name must be match with /\A\@?[\w-]{1,255}\z/: #{option}" end unless Worker.where(queue: option, working: true).exists? raise Workflow::AssertionError, "No such queue : #{option}" end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems