Note that there are some explanatory texts on larger screens.

plurals
  1. POparallelly run data importing in my case
    primarykey
    data
    text
    <p>I am developing a <strong>Rails v2.3</strong> app. and using <strong>MySQL v5.1</strong> as my DB.</p> <p>Currently, in my Rails app, I have one <strong>rake task</strong> (invoke a method from Helper) which is used to execute several <strong>.sql</strong> dump file to import data from a <strong>template database</strong> to my <code>development database</code>. For example <code>execute_dump("fill_all_tables.sql")</code>.</p> <p>The <strong>.sql</strong> file looks like:</p> <pre><code>TRUNCTE TABLE cars; ALTER TABLE DISABLE KEYS INSERT INTO cars (col1,col2,col3,...) VALUES SELECT (...) FROM template_db.cars WHERE... ALTER TABLE ENABLE KEYS OPTIMIZE TABLE </code></pre> <p>Then, I have a <strong>2nd</strong> rake task which will run a script to create a new (3rd) database, also import data from the same <strong>template database</strong> but put data to the new created <code>3rd database</code>.</p> <p>So, two rake tasks(or methods) which both import data from the same <strong>template database</strong> but put to <strong>seperate different databases</strong>. (one to development database while the other to the 3rd database).</p> <p><strong>I want to have the above data importing things to be happening parallelly. How can I achieve in Rails?</strong></p> <h2><strong>P.S.</strong></h2> <p>Both my <code>development database</code> and <code>3rd database</code> have the same tables created before data importing start. And my first rake task will do more things after data importing.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload