<commit_before><?php

namespace schema_task;

use model\schema_task;
use Doctrine\DBAL\Connection as db;
use service\cache;
use Monolog\Logger;
use queue\geocode as geocode_queue;

use service\schedule;
use service\groups;
use service\this_group;

class geocode extends schema_task
{
	private $queue;
	private $monolog;
	private $cache;
	private $db;

	private $curl;
	private $geocoder;

	private $geocode_queue;

	public function __construct(db $db, cache $cache, Logger $monolog, geocode_queue $geocode_queue,
		schedule $schedule, groups $groups, this_group $this_group)
	{
		parent::__construct($schedule, $groups, $this_group);
		$this->monolog = $monolog;
		$this->cache = $cache;
		$this->db = $db;
		$this->geocode_queue = $geocode_queue;
	}

	public function process()
	{
		$log_ary = [];

		$st = $this->db->prepare('select c.value, c.id_user
			from ' . $this->schema . '.contact c, ' . $this->schema . '.type_contact tc, ' . $this->schema . '.users u
			where c.id_type_contact = tc.id
				and tc.abbrev = \'adr\'
				and c.id_user = u.id
				and u.status in (1, 2)');<commit_msg>block geocode queueing<commit_after><?php

namespace schema_task;

use model\schema_task;
use Doctrine\DBAL\Connection as db;
use service\cache;
use Monolog\Logger;
use queue\geocode as geocode_queue;

use service\schedule;
use service\groups;
use service\this_group;

class geocode extends schema_task
{
	private $queue;
	private $monolog;
	private $cache;
	private $db;

	private $curl;
	private $geocoder;

	private $geocode_queue;

	public function __construct(db $db, cache $cache, Logger $monolog, geocode_queue $geocode_queue,
		schedule $schedule, groups $groups, this_group $this_group)
	{
		parent::__construct($schedule, $groups, $this_group);
		$this->monolog = $monolog;
		$this->cache = $cache;
		$this->db = $db;
		$this->geocode_queue = $geocode_queue;
	}

	public function process()
	{
		if (getenv('GEO_BLOCK'))
		{
			error_log('geo coding is blocked.');
			return;
		}

		$log_ary = [];

		$st = $this->db->prepare('select c.value, c.id_user
			from ' . $this->schema . '.contact c, ' . $this->schema . '.type_contact tc, ' . $this->schema . '.users u
			where c.id_type_contact = tc.id
				and tc.abbrev = \'adr\'
				and c.id_user = u.id
				and u.status in (1, 2)');
{'fraction_non_alphanumeric': 0.14154250657318143, 'fraction_numerical': 0.0017528483786152498, 'mean_word_length': 4.02863436123348, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '5074756', 'n_tokens_mistral': 897, 'n_tokens_neox': 837, 'n_words': 208}