class LibreofficeWorker extends BaseWorker

Properties

SystemWorkerController $mod from  BaseWorker

Methods

__construct(SystemWorkerController $mod)

No description

bool
convertFileToPDF(string $sourceFile, string $targetFile)

Send file to worker, convert

Base
getApiClient()

No description

string|null
getApiHost()

No description

array|null
getCallbackCheckResult(string $callbackUri, string|null $bearerToken = null)

Sends a request containing the callback URI in order to test, whether the callback can be called from the worker back to XELOS.

static string
getIconClass()

No description

int|null
getLocalPackageMaxLength()

Fetches the package max length from the environment variables (most likely the Docker environment) and calculates the length according to the unit.

string
getName()

No description

string
getWorkerID()

No description

int
getWorkerPackageMaxLength()

Fetches the package_max_length setting from the video worker instance used for comparison with the local setting.

array
getWorkerRequestLog()

Returns the logs of worker requests.

array
getWorkerStats()

Retrieve current worker stats Currently this is primarily based upon Openswoole (see https://openswoole.com/docs/modules/swoole-server-stats )

bool
isDocumentConversionSupported(string $pathToFile)

Is the conversion of the document supported according to our knowledge? Todo: We might be able to retrieve / populate this list dynamically from the worker later.. Todo: Do we want to support the old configurations?

bool
isWorkerAvailable()

Can we connect to the worker service / container?

Details

in BaseWorker at line 15
__construct(SystemWorkerController $mod)

No description

Parameters

SystemWorkerController $mod

in BaseWorker at line 81
BaseWorker applyXELOSConfigurationParameters()

No description

Return Value

BaseWorker

at line 50
bool convertFileToPDF(string $sourceFile, string $targetFile)

Send file to worker, convert

Parameters

string $sourceFile

Provide path to your sourcefile, e.g. /my/path/word.docx

string $targetFile

Provide a writeable filepath, e.g. /tmp/target.pdf

Return Value

bool

Exceptions

Exception

at line 61
Base getApiClient()

No description

Return Value

Base

in BaseWorker at line 27
string|null getApiHost()

No description

Return Value

string|null

in BaseWorker at line 143
array|null getCallbackCheckResult(string $callbackUri, string|null $bearerToken = null)

Sends a request containing the callback URI in order to test, whether the callback can be called from the worker back to XELOS.

Parameters

string $callbackUri
string|null $bearerToken

Return Value

array|null

at line 54
static string getIconClass()

No description

Return Value

string

in BaseWorker at line 128
protected int|null getLocalPackageMaxLength()

Fetches the package max length from the environment variables (most likely the Docker environment) and calculates the length according to the unit.

Return Value

int|null

in BaseWorker at line 70
string getName()

No description

Return Value

string

in BaseWorker at line 19
string getWorkerID()

No description

Return Value

string

in BaseWorker at line 115
protected int getWorkerPackageMaxLength()

Fetches the package_max_length setting from the video worker instance used for comparison with the local setting.

Return Value

int

0 If the variable is not set. Otherwise the variable's value.

in BaseWorker at line 157
array getWorkerRequestLog()

Returns the logs of worker requests.

Return Value

array

in BaseWorker at line 57
array getWorkerStats()

Retrieve current worker stats Currently this is primarily based upon Openswoole (see https://openswoole.com/docs/modules/swoole-server-stats )

Return Value

array

[ 'up' => 1|0, 'version' => 'OpenSwoole-22.0.0', 'workers_total' => 12, 'workers_idle' => 11, 'start_time' => 1700464155, 'start_seconds' => 123, 'connections_accepted' => 100, 'connections_active' => 1, 'connections_closed' => 99 ]

at line 21
bool isDocumentConversionSupported(string $pathToFile)

Is the conversion of the document supported according to our knowledge? Todo: We might be able to retrieve / populate this list dynamically from the worker later.. Todo: Do we want to support the old configurations?

Parameters

string $pathToFile

Return Value

bool

in BaseWorker at line 36
bool isWorkerAvailable()

Can we connect to the worker service / container?

Return Value

bool