Skip to content

Instantly share code, notes, and snippets.

@populist
Created April 28, 2015 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save populist/1d338ea08cdf62c67d63 to your computer and use it in GitHub Desktop.
Save populist/1d338ea08cdf62c67d63 to your computer and use it in GitHub Desktop.
POC Patch to Webform Module to Sleep During Batch Export
commit e9006b1a54e93c96c0e89e0681fa7a582c7e39b6
tree 995ee6992bf30e4ab13799ecbe84993e3ac72a82
parent d2bb10cfb9076b50fa470e492a411ca91f560c95
author Matt Cheney <matt@rychosis.org> 1430260305 +0000
committer Matt Cheney <matt@rychosis.org> 1430260305 +0000
Let's take a nap during the webform export
diff --git a/sites/all/modules/webform/includes/webform.report.inc b/sites/all/modules/webform/includes/webform.report.inc
index 2669dd2..e00e8ad 100644
--- a/sites/all/modules/webform/includes/webform.report.inc
+++ b/sites/all/modules/webform/includes/webform.report.inc
@@ -860,11 +860,17 @@ function webform_results_export_batch($node, $format = 'delimited', $options = a
return array(
'operations' => array(
array('webform_results_batch_bof', array($node, $format, $options)),
+ array('webform_results_batch_sleep', array($node, $format, $options)),
array('webform_results_batch_headers', array($node, $format, $options)),
+ array('webform_results_batch_sleep', array($node, $format, $options)),
array('webform_results_batch_rows', array($node, $format, $options)),
+ array('webform_results_batch_sleep', array($node, $format, $options)),
array('webform_results_batch_eof', array($node, $format, $options)),
+ array('webform_results_batch_sleep', array($node, $format, $options)),
array('webform_results_batch_post_process', array($node, $format, $options)),
+ array('webform_results_batch_sleep', array($node, $format, $options)),
array('webform_results_batch_results', array($node, $format, $options)),
+ array('webform_results_batch_sleep', array($node, $format, $options)),
),
'finished' => 'webform_results_batch_finished',
'title' => t('Exporting submissions'),
@@ -874,6 +880,10 @@ function webform_results_export_batch($node, $format = 'delimited', $options = a
);
}
+function webform_results_batch_sleep($node, $format, $options) {
+sleep(2);
+}
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment