Question

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,

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top