protected function _convertPriority($priority)
    {
        if (!is_numeric($priority)) {
            throw new \Exeption('Error while converting priority, agrument is '
                    . 'not a number, '. gettype($priority) .' sent');
        }

        switch ($priority) {
            case Task::PRIORITY_LOW:
                // Least urgent Beanstalkd priority
                return 4294967295;
                
            case Task::PRIORITY_NORMAL:
                return PheanstalkInterface::DEFAULT_PRIORITY;

            case Task::PRIORITY_HIGH:
                return 1024;

            default:
                return 512;
        }
    }