function _backup_migrate_check_timeout in Backup and Migrate 8.2
Same name and namespace in other branches
- 8.3 backup_migrate.module \_backup_migrate_check_timeout()
- 6.3 backup_migrate.module \_backup_migrate_check_timeout()
- 6.2 backup_migrate.module \_backup_migrate_check_timeout()
- 7.3 backup_migrate.module \_backup_migrate_check_timeout()
- 7.2 backup_migrate.module \_backup_migrate_check_timeout()
7 calls to _backup_migrate_check_timeout()
- backup_migrate_backup_db_to_file_mysql in includes/
db.mysql.inc - Get the sql dump file.
- backup_migrate_destination_db_mysql::_backup_db_to_file in includes/
destinations.db.mysql.inc - Backup the databases to a file.
- backup_migrate_destination_db_mysql::_restore_db_from_file in includes/
destinations.db.mysql.inc - Backup the databases to a file.
- backup_migrate_perform_backup in ./
backup_migrate.module - Perform a backup with the given settings.
- backup_migrate_perform_restore in ./
backup_migrate.module - Restore from a file in the given destination.
File
- ./
backup_migrate.module, line 986 - Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)
Code
function _backup_migrate_check_timeout() {
static $timeout;
// Max execution of 0 means unlimited.
if (ini_get('max_execution_time') == 0) {
return false;
}
// Figure out when we should stop execution.
if (!$timeout) {
$timeout = (!empty($_SERVER['REQUEST_TIME']) ? $_SERVER['REQUEST_TIME'] : time()) + ini_get('max_execution_time') - variable_get('backup_migrate_timeout_buffer', 5);
}
return time() > $timeout;
}