PyWebDesign
PyWebDesign

Reputation: 197

how to make rails 3 do something in some time

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,

Upvotes: 0

Views: 64

Answers (1)

Saurabh Goyal
Saurabh Goyal

Reputation: 51

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

Upvotes: 1

Related Questions