1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс Job

Открытые члены

 doStep ()
 getData ()

Открытые статические члены

static findJob (int $sitemapId)
static addJob (int $sitemapId)
static markToRegenerate (int $sitemapId)
static clearBySitemap (int $sitemapId)
static doJobAgent (int $sitemapId)

Поля данных

const STATUS_REGISTER = 'R'
const STATUS_PROCESS = 'P'
const STATUS_FINISH = 'F'
const STATUS_ERROR = 'E'

Защищенные члены

 __construct (int $sitemapId)
 lock ()
 unlock ()
 checkLock ()
 save ()
 finish ()
 getFormattedStatusMessage ()

Защищенные статические члены

static checkSitemapExists (int $sitemapId)
static getDataBySitemap (int $sitemapId)
static findAgent (int $sitemapId)
static addAgent (int $sitemapId)
static deleteAgent (int $sitemapId)
static getAgentName (int $sitemapId)

Защищенные данные

const AGENT_FUNCTION = 'doJobAgent'
const AGENT_INTERVAL = 1
const AGENT_DELAY = 60
const LOCK_MAX_INTERVAL = 300
const PROGRESS_WIDTH = 500
int $id
int $sitemapId
int $step
array $state
string $status
string $statusMessage = ''
bool $isLocked = false
DateTime $dateModify

Подробное описание

Control process of sitemap generation. Multistep, reload, agent etc

См. определение в файле Job.php строка 19

Конструктор(ы)

◆ __construct()

__construct ( int $sitemapId)
protected

Create job for sitemap by table

Исключения
SystemException

См. определение в файле Job.php строка 70

Методы

◆ addAgent()

addAgent ( int $sitemapId)
staticprotected

Add agent for regenerate sitemap

Аргументы
int$sitemapId
Возвращает
int - id of new agent

См. определение в файле Job.php строка 255

◆ addJob()

addJob ( int $sitemapId)
static

Register new job or get existing

Аргументы
int$sitemapIdId of map.
Возвращает
Job|null
Исключения
SystemException

См. определение в файле Job.php строка 145

◆ checkLock()

checkLock ( )
protected

См. определение в файле Job.php строка 398

◆ checkSitemapExists()

checkSitemapExists ( int $sitemapId)
staticprotected

Try to find sitemap by ID

Аргументы
int$sitemapIdID of sitemap
Возвращает
bool
Исключения
SystemException

Bitrix\Main\ArgumentException

Исключения

Bitrix\Main\ObjectPropertyException

См. определение в файле Job.php строка 108

◆ clearBySitemap()

clearBySitemap ( int $sitemapId)
static

См. определение в файле Job.php строка 224

◆ deleteAgent()

deleteAgent ( int $sitemapId)
staticprotected

Find existing agent for sitemap, delete if find

Аргументы
int$sitemapId
Возвращает
bool

См. определение в файле Job.php строка 276

◆ doJobAgent()

doJobAgent ( int $sitemapId)
static

Method for run agent

Аргументы
int$sitemapIdId of map.
Возвращает
string

См. определение в файле Job.php строка 297

◆ doStep()

doStep ( )

Run one step of generation

Возвращает
Result

См. определение в файле Job.php строка 317

◆ findAgent()

findAgent ( int $sitemapId)
staticprotected

Check if agent exists for current job

Аргументы
int$sitemapId
Возвращает
array|null - data of agent, if found

См. определение в файле Job.php строка 235

◆ findJob()

findJob ( int $sitemapId)
static

Find job for sitemap, If find - return object, null if not

Аргументы
int$sitemapIdId of map.
Возвращает
Job|null

См. определение в файле Job.php строка 125

◆ finish()

finish ( )
protected

When job is done - do finish operations

Возвращает
bool

См. определение в файле Job.php строка 440

◆ getAgentName()

getAgentName ( int $sitemapId)
staticprotected

См. определение в файле Job.php строка 287

◆ getData()

getData ( )

Get data od generation process

Возвращает
array

См. определение в файле Job.php строка 455

◆ getDataBySitemap()

getDataBySitemap ( int $sitemapId)
staticprotected

Find existing job in DB, return data if exists

Аргументы
int$sitemapId
Возвращает
array|null

См. определение в файле Job.php строка 177

◆ getFormattedStatusMessage()

getFormattedStatusMessage ( )
protected

См. определение в файле Job.php строка 465

◆ lock()

lock ( )
protected

См. определение в файле Job.php строка 361

◆ markToRegenerate()

markToRegenerate ( int $sitemapId)
static

Create agent for automatic re-generate sitemap in background.

Аргументы
int$sitemapIdId of map.
Возвращает
bool

См. определение в файле Job.php строка 199

◆ save()

save ( )
protected

Save current params in table

Возвращает
bool

См. определение в файле Job.php строка 421

◆ unlock()

unlock ( )
protected

См. определение в файле Job.php строка 379

Поля

◆ $dateModify

DateTime $dateModify
protected

См. определение в файле Job.php строка 64

◆ $id

int $id
protected

ID of Job row in table

Возвращает
void

См. определение в файле Job.php строка 44

◆ $isLocked

bool $isLocked = false
protected

Job properties

См. определение в файле Job.php строка 63

◆ $sitemapId

int $sitemapId
protected

См. определение в файле Job.php строка 50

◆ $state

array $state
protected

См. определение в файле Job.php строка 56

◆ $status

string $status
protected

См. определение в файле Job.php строка 57

◆ $statusMessage

string $statusMessage = ''
protected

См. определение в файле Job.php строка 58

◆ $step

int $step
protected

Parameters for init generator

См. определение в файле Job.php строка 55

◆ AGENT_DELAY

const AGENT_DELAY = 60
protected

См. определение в файле Job.php строка 23

◆ AGENT_FUNCTION

const AGENT_FUNCTION = 'doJobAgent'
protected

См. определение в файле Job.php строка 21

◆ AGENT_INTERVAL

const AGENT_INTERVAL = 1
protected

См. определение в файле Job.php строка 22

◆ LOCK_MAX_INTERVAL

const LOCK_MAX_INTERVAL = 300
protected

См. определение в файле Job.php строка 25

◆ PROGRESS_WIDTH

const PROGRESS_WIDTH = 500
protected

Progressbar width

См. определение в файле Job.php строка 30

◆ STATUS_ERROR

const STATUS_ERROR = 'E'

См. определение в файле Job.php строка 38

◆ STATUS_FINISH

const STATUS_FINISH = 'F'

См. определение в файле Job.php строка 37

◆ STATUS_PROCESS

const STATUS_PROCESS = 'P'

См. определение в файле Job.php строка 36

◆ STATUS_REGISTER

const STATUS_REGISTER = 'R'

Statuses of current job

См. определение в файле Job.php строка 35


Объявления и описания членов класса находятся в файле:
  • C:/bitrix/modules/seo/lib/Sitemap/Job.php