function _backup_migrate_check_timeout in Backup and Migrate 6.3
Same name and namespace in other branches
- 8.2 backup_migrate.module \_backup_migrate_check_timeout()
- 8.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()
5 calls to _backup_migrate_check_timeout()
- 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.
- backup_migrate_shutdown in ./
backup_migrate.module - Shutdown callback. Called when the script terminates even if the script timed out.
- backup_migrate_source_db_mysql::_backup_db_to_file in includes/
sources.db.mysql.inc - Backup the databases to a file.
- backup_migrate_source_db_mysql::_restore_db_from_file in includes/
sources.db.mysql.inc - Backup the databases to a file.
File
- ./
backup_migrate.module, line 1595 - 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;
}