<commit_before><?
namespace Concrete\Job;
use Loader;
use QueueableJob;
use Group;
use User;
use Zend_Queue;
use Zend_Queue_Message;
class CheckAutomatedGroups extends QueueableJob {

	public $jSupportsQueue = true;

	public function getJobName() {
		return t("Check Automated Groups");
	}

	public function getJobDescription() {
		return t("Automatically add users to groups and assign badges..");
	}

	public function start(Zend_Queue $q) {
		$db = Loader::db();
		$r = $db->Execute('select Users.uID from Users where uIsActive = 1 order by uID asc');
		while ($row = $r->FetchRow()) {
			$q->send($row['uID']);
		}
	}

	public function finish(Zend_Queue $q) {
		return t('Active users updated.');
	}

	public function processQueueItem(Zend_Queue_Message $msg) {
		$ux = User::getByUserID($msg->body);
		$groupControllers = Group::getAutomatedOnJobRunGroupControllers($ux);
		foreach($groupControllers as $ga) {
			if ($ga->check($ux)) {
				$ux->enterGroup($ga->getGroupObject());
			}<commit_msg>remove unnecessary dot in description of the job<commit_after><?
namespace Concrete\Job;
use Loader;
use QueueableJob;
use Group;
use User;
use Zend_Queue;
use Zend_Queue_Message;
class CheckAutomatedGroups extends QueueableJob {

	public $jSupportsQueue = true;

	public function getJobName() {
		return t("Check Automated Groups");
	}

	public function getJobDescription() {
		return t("Automatically add users to groups and assign badges.");
	}

	public function start(Zend_Queue $q) {
		$db = Loader::db();
		$r = $db->Execute('select Users.uID from Users where uIsActive = 1 order by uID asc');
		while ($row = $r->FetchRow()) {
			$q->send($row['uID']);
		}
	}

	public function finish(Zend_Queue $q) {
		return t('Active users updated.');
	}

	public function processQueueItem(Zend_Queue_Message $msg) {
		$ux = User::getByUserID($msg->body);
		$groupControllers = Group::getAutomatedOnJobRunGroupControllers($ux);
		foreach($groupControllers as $ga) {
			if ($ga->check($ux)) {
				$ux->enterGroup($ga->getGroupObject());
			}
{'fraction_non_alphanumeric': 0.1391347099311701, 'fraction_numerical': 0.0009832841691248771, 'mean_word_length': 4.967741935483871, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7311088', 'n_tokens_mistral': 721, 'n_tokens_neox': 671, 'n_words': 177}