Created
June 4, 2009 13:34
-
-
Save danwrong/123613 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
state :new, :default => true do | |
handle :queue! do | |
enqueue | |
transition_to :queued | |
save! | |
end | |
handle :fetch_ga_data! do | |
fetch_ga_data | |
extract_terms | |
transition_to :fetched_ga_data | |
save! | |
end | |
transition :to => :queued | |
transition :to => :fetched_ga_data | |
transition :to => :error, :on => :error! | |
end | |
state :queued do | |
handle :start! do | |
transition_to :started | |
save! | |
end | |
transition :to => :started | |
end | |
state :started do | |
handle :fetch_ga_data! do | |
fetch_ga_data | |
extract_terms | |
transition_to :fetched_ga_data | |
save! | |
end | |
transition :to => :fetched_ga_data | |
transition :to => :error, :on => :error! | |
end | |
state :fetched_ga_data do | |
handle :compile_niches! do | |
compile_niche_data | |
transition_to :compiled_niches | |
save! | |
end | |
transition :to => :compiled_niches | |
transition :to => :error, :on => :error! | |
end | |
state :compiled_niches do | |
handle :fetch_gtool_data! do | |
fetch_gtool_data | |
transition_to :complete | |
save! | |
end | |
transition :to => :complete | |
transition :to => :error, :on => :error! | |
end | |
state :complete | |
state :error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment