Yioop_V9.5_Source_Code_Documentation

MediaUpdater
in package
implements CrawlConstants

Separate process/command-line script which can be used to update news sources for Yioop and also handle other kinds of activities such as video conversion. This is as an alternative to using the web app for updating. Makes use of the web-apps code.

Tags
author

Chris Pollett

Interfaces, Classes, Traits and Enums

CrawlConstants
Shared constants and enums used by components that are involved in the crawling process

Table of Contents

MINIMUM_UPDATE_LOOP_TIME  = 10
Shortest time through one iteration of news updater's loop
$jobs  : array<string|int, mixed>
List of job this media updater performs
$mail_mode  : bool
If true then it is assumed that mail should be sent using a media updater rather than from within the web app
$media_mode  : string
Controls whether media updating should be viewed as only occurring on the name server or should it be viewed as a distributed process amongst all machines in this Yioop instance
$update_time  : int
The last time feeds were checked for updates
__construct()  : mixed
Sets up the field variables so that media updating can begin
getUpdateProperties()  : mixed
Makes a request to the name server to find out if we are running as a media updater just on the name server or on both the name server as well as all other machines in the Yioop instance
loadJobs()  : mixed
Given a list of MediaUpdate jobs, updates $this->jobs to contain instantiated objects of the the corresponding jobs, requiring classes that have not been loaded yet as needed.
loop()  : mixed
Main loop for the news updater.
start()  : mixed
This is the function that should be called to get the MediaUpdater to start to start updating. Calls init to handle the command-line arguments then enters news_updaters main loop

Constants

MINIMUM_UPDATE_LOOP_TIME

Shortest time through one iteration of news updater's loop

public mixed MINIMUM_UPDATE_LOOP_TIME = 10

Properties

$jobs

List of job this media updater performs

public array<string|int, mixed> $jobs

$mail_mode

If true then it is assumed that mail should be sent using a media updater rather than from within the web app

public bool $mail_mode

$media_mode

Controls whether media updating should be viewed as only occurring on the name server or should it be viewed as a distributed process amongst all machines in this Yioop instance

public string $media_mode

$update_time

The last time feeds were checked for updates

public int $update_time

Methods

__construct()

Sets up the field variables so that media updating can begin

public __construct() : mixed
Return values
mixed

getUpdateProperties()

Makes a request to the name server to find out if we are running as a media updater just on the name server or on both the name server as well as all other machines in the Yioop instance

public getUpdateProperties() : mixed
Return values
mixed

loadJobs()

Given a list of MediaUpdate jobs, updates $this->jobs to contain instantiated objects of the the corresponding jobs, requiring classes that have not been loaded yet as needed.

public loadJobs(array<string|int, mixed> $jobs_list) : mixed
Parameters
$jobs_list : array<string|int, mixed>

list of MediaUpdater jobs

Return values
mixed

loop()

Main loop for the news updater.

public loop() : mixed
Return values
mixed

start()

This is the function that should be called to get the MediaUpdater to start to start updating. Calls init to handle the command-line arguments then enters news_updaters main loop

public start() : mixed
Return values
mixed

        

Search results