function hosting_queues_configure_submit in Hostmaster (Aegir) 6
Submit callback for the the queue execution frequency form.
See also
File
- modules/
hosting/ hosting.module, line 714 - Hosting module.
Code
function hosting_queues_configure_submit($form, &$form_state) {
foreach (hosting_get_queues() as $queue => $info) {
if ($form_state['values'][$queue]) {
variable_set("hosting_queue_" . $queue . "_enabled", $form_state['values'][$queue]['enabled']);
variable_set("hosting_queue_" . $queue . "_frequency", $form_state['values'][$queue]['frequency']['ticks'] * $form_state['values'][$queue]['frequency']['unit']);
if ($info['type'] == 'serial') {
variable_set("hosting_queue_" . $queue . "_items", $form_state['values'][$queue]['frequency']['items']);
}
}
}
drupal_set_message(t('The queue settings have been updated.'));
}