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) »
  • Possible improvement of job.disable_expired_relationships
Pages: [1]

Author Topic: Possible improvement of job.disable_expired_relationships  (Read 468 times)

johanv

  • I post occasionally
  • **
  • Posts: 65
  • Karma: 5
  • #chiro #geek #linux #beer
    • my homepage
  • CiviCRM version: 4.7.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.x
  • PHP version: 5.x
Possible improvement of job.disable_expired_relationships
June 29, 2015, 11:34:05 am
We are (still  ;)) migrating a large database (+/- 1 million relationships) to CiviCRM. Now after the migration, we want to run job.disable_expired_relationships to change the status of all imported relationships with end_date in the past to inactive.

This seemed to cause a timeout; about 900000 of the relationships need to be updated.

I applied a rather simple patch to our CiviCRM implementation that avoids this timeout:
https://github.com/civicrm/civicrm-core/compare/master...johanv:timeout_fix_update_relationship_status?expand=1

Instead of updating the records one by one, I now update all the records using an update statement.

I wonder whether I should create a pull request. Is there a particular reason for updating the relationships one by one?
« Last Edit: June 29, 2015, 11:38:22 am by johanv »

mallezie

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Drupal
  • PHP version: 5.4
Re: Possible improvement of job.disable_expired_relationships
July 28, 2015, 02:57:24 am
I've gone ahead, and created an issue https://issues.civicrm.org/jira/browse/CRM-16924 and PR https://github.com/civicrm/civicrm-core/pull/6322

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Possible improvement of job.disable_expired_relationships

This forum was archived on 2017-11-26.