2
나는 ruby on rail을 기반으로하는 웹 어플리케이션을 가지고 있는데, 이는 this 작업 젬을 지연 시켰습니다.레일 - 지연된 작업 완료
지연된 작업을 트리거하는 기능이있어서 차례대로 다른 지연된 작업이 트리거됩니다. 부모와 관련된 모든 작업이 완료되었음을 나타낼 수있는 이벤트 인 중첩 케이스가 있습니까? 아니면 내가 문서를 검색하려고 할 때 사용할 수있는 데이터가 무엇이든간에 작업해야합니까?
예 : 어쩌면
def create_vegetable
#..... creates some vegetable
end
def create_vegetable_asynchronously id
Farm.delay(priority: 30, owner: User.where("authentication.auth_token" => token).first, class_name: "Farm", job_name:create "create_vegetable_asynchronously").create_vegetable(id)
end
def create_farm_asynchronously data
data.each do |vegetable|
create_vegetable_asynchronously vegetable.id
end
end
handle_asynchronously :create_farm_asynchoronously