Finish Ruby command BEFORE moving on to the next

26 views
Skip to first unread message

Jason Hsu, Rubyist

unread,
Jan 23, 2015, 12:02:50 AM1/23/15
to rubyonra...@googlegroups.com
THE EASY PART:
I have four Ruby commands in a Ruby script that need to be executed in the following order:
1.  long_command1
2.  long_command2
3.  long_command3
4.  long_command4

THE HARD PART:
How do I make sure that the Ruby script finishes one command before moving on to the next one?  long_command1 needs to be completed before long_command2 can begin, long_command2 needs to be completed before long_command3 can begin, and long_command3 needs to be completed before long_command4 can begin.

Vivek Sampara

unread,
Jan 23, 2015, 2:49:41 AM1/23/15
to rubyonra...@googlegroups.com
Correct me if im not wrong as long as its running on a single thread, there should be no confusion in terms of sequence. 

Just run them in sequence and they should work fine. 

long_command1
long_command2
long_command3
long_command4

The only cache is if all the commands are running in a single process and has no external dependencies. 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/225a9432-3b33-4650-a5b0-8095409e403a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages