CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Import Process
Pages: [1]

Author Topic: Import Process  (Read 1486 times)

mbriney

  • I’m new here
  • *
  • Posts: 21
  • Karma: 2
  • Technical Product Manager / VP at Edelman
    • Edelman Public Relations
Import Process
April 15, 2010, 01:57:46 pm
Is there any documentation on how the import process works in CiviCRM?  We are running 3.1.3 on a multi-server environment.  The load ballancer is set to timeout HTTP requests after 30 seconds (this we cannot change).  What we wanted to see is if we could configure the import process to either send a keep alive packet back to the browser or if there was a way to queue up an import and then have a cron job keep processing the import in the background.

Thanks,
-Matt
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import Process
April 15, 2010, 03:19:37 pm

This is currently not doable out of the box, BUT i dont think its too hard for a developer to be able to extend this to allow the below.

A few thoughts on how this can be done:

a. extend the core import code (both preview and summary) to allow an offset/limit combination sent in via $_REQUEST

b. after processing the lines offset to offset + limit, the code redirects back to the same page with new offset till we are done processing

c. all the stats we collect will need to be saved during the redirection

if you / your org have the resources to help make the above happen that would be great. Alternatively doing a command line version of the import would be a good alternative

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mbriney

  • I’m new here
  • *
  • Posts: 21
  • Karma: 2
  • Technical Product Manager / VP at Edelman
    • Edelman Public Relations
Re: Import Process
April 15, 2010, 03:32:19 pm
Thanks Donald.

It is something that our team has the resources and technical expertise to do.  Are there any pointers on what files in the CRM/import folder we should be looking at first?

-Matt
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import Process
April 15, 2010, 04:20:45 pm

Do you wanna tell your dev team to get on IRC and we can chat and come up with a plan

we currently do the import via AJAX. to begin with, i would kill the ajax part and basically keep redirecting to same screen till done (varying offset). I think you can modify: templates/CRM/Import/Form/Preview.tpl to kill the ajax part

Some files to check:

CRM/Import/ImportJob.php, function run. I suspect this is the only one to modify and redirect back to same page if import not yet done

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mbriney

  • I’m new here
  • *
  • Posts: 21
  • Karma: 2
  • Technical Product Manager / VP at Edelman
    • Edelman Public Relations
Re: Import Process
April 16, 2010, 07:50:12 am
That would be great or if it's easier, our team is headed to SF for training on Sunday and will be in town for DrupalCon and CiviCon.  We could grab a beer somewhere and talk it through.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import Process
April 16, 2010, 09:33:25 am

Not sure if you / your developers are attending civicrm developer training (http://civicrm.org/civicrm/event/info?reset=1&id=25) but definitely recommended and worth it for a folks integrating / extending civicrm. If so, we can chat more about it that time

if not, we are thinking of doing a few code sprints / BoF sessions during drupalcon and we could meet there

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mbriney

  • I’m new here
  • *
  • Posts: 21
  • Karma: 2
  • Technical Product Manager / VP at Edelman
    • Edelman Public Relations
Re: Import Process
April 16, 2010, 10:41:32 am
We will be at the developer training.  We'll see you there.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Import Process
April 17, 2010, 01:43:47 am
Another possibility that might be worth investigating (but Drupal-centric) is creating a handler for the migrate module. The migrate module already has drush integration & a useful interface. It is a possibility that would work if you already had your data in a table in mysql - it uses the table wizard module to expose the tables & choose fields and relationships between tables. Thus you can create an import set from a bunch of legacy tables, design an import & then test it & reverse it (a few times). When you are ready to go you can run it through drush.

It works at the moment for nodes, cck, taxonomies etc
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Import Process

This forum was archived on 2017-11-26.