function _video_db_increase_timeout in Video 6.4
Same name and namespace in other branches
- 6.5 video.module \_video_db_increase_timeout()
Increase the database timeout in preparation for long time operations, such as S3 uploads and local transcoding.
Reconnecting to the database after this operation is not possible due to the way db_set_active stores the connection identifiers.
At this moment, only mysqli and mysql are handled. The timeout is set to 1 day
2 calls to _video_db_increase_timeout()
- video_amazon_s3::pushFile in plugins/
video_s3/ video_s3.lib.inc - video_ffmpeg::convert_video in transcoders/
video_ffmpeg.inc
File
- ./
video.module, line 502 - video.module
Code
function _video_db_increase_timeout() {
global $db_type;
if ($db_type === 'mysqli' || $db_type === 'mysql') {
$timeout = 24 * 60 * 60;
// one day
db_query('SET SESSION wait_timeout = %d', $timeout);
}
}