function background_process_service_group_random in Background Process 8
Same name and namespace in other branches
- 6 background_process.module \background_process_service_group_random()
- 7.2 background_process.module \background_process_service_group_random()
- 7 background_process.module \background_process_service_group_random()
Implements to Load balancing based on random pick.
File
- ./
background_process.module, line 192 - This module implements a framework for calling funtions in the background.
Code
function background_process_service_group_random($service_group) {
return $service_group['hosts'][rand(0, count($service_group['hosts']) - 1)];
}