Author: sevein
Date: Wed Dec 7 15:39:00 2011
New Revision: 10372
Log:
Close database connections before the process is forked
Modified:
trunk/plugins/qtSwordPlugin/lib/qtSwordPluginWorker.class.php
Modified: trunk/plugins/qtSwordPlugin/lib/qtSwordPluginWorker.class.php
==============================================================================
--- trunk/plugins/qtSwordPlugin/lib/qtSwordPluginWorker.class.php Tue Dec
6 16:14:22 2011 (r10371)
+++ trunk/plugins/qtSwordPlugin/lib/qtSwordPluginWorker.class.php Wed Dec
7 15:39:00 2011 (r10372)
@@ -40,6 +40,10 @@
// Unserialize contents passed to the job
$package = unserialize($job->workload());
+ // Close any database resource available before the process is forked
+ // Issue "MySQL server has gone away"
+ Propel::close();
+
// Fork process
$pid = pcntl_fork();
@@ -49,10 +53,13 @@
}
else if ($pid)
{
+ echo "Forked requested, waiting...";
pcntl_wait($status);
}
else
{
+ echo " forked!\n";
+
// QubitSetting are not available for tasks? See
lib/SiteSettingsFilter.class.php
sfConfig::add(QubitSetting::getSettingsArray());
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.