function background_process_is_finished in Background Process 7
Same name and namespace in other branches
- 8 background_process.module \background_process_is_finished()
- 6 background_process.module \background_process_is_finished()
Check if the background process has finished.
Parameters
string $handle: Handle of openend background process
Return value
bool TRUE if finished, FALSE if not
File
- ./
background_process.module, line 676
Code
function background_process_is_finished($handle) {
$old_db = db_set_active('background_process');
$progress = progress_get_progress($handle);
db_set_active($old_db);
return empty($progress) || $progress->end;
}