سؤال

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