문제

I am using the gem: scottmotte / digitalocean which seams to be the best. Please inform me on this.

I can create a server using

Digitalocean::Droplet.create({:name => droplet_name, :size_id => size_id, :image_id => image_id, :region_id => region_id)

But I would like to check after some time if everything is working fine since creating a droplet takes at least 1 minute.

How can I ask rails to do an API call in some given time, and then, doing something depending on the result? Is there any convention and pattern?

thank you very much,

도움이 되었습니까?

해결책

What you need is a scheduler for your tasks. Use something like resque for this.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top