Index


NAME

Top

    LATMOS::Accounts::Task

DESCRIPTION

Top

Parent class for regular task run by la-sync-manager

FUNCTIONS

Top

new($module, %options)

Instanciate a new task of type $module

The module must provide a _new() function.

config($value, $default)

Return config value for the module

order

Return the priority for the module: 0, 1 or 2 (0 = first)

init

Call at task startup, can be overload

needupd($baserev, $syncm)

This function is to call to check if the module have to run or not.

$baserev is the current base revision en $syncm the revision when la-sync-manager was run.

By default return true only if base has changed, overload for different behavior.

runDelay

Return the minimum of second to wait to have the module running again.

Return 0 but can be override by Task module.

waitDelay

Return the number of second to wait before next run even there is changes in database.

Return 0 but can be override by Task module.

needToBeRun

Return TRUE is the module has to be run or not.

run

Must be provided by module, do the desired work.

post

Call after run()

reset_savepoint

Reset the savepoint to 0 to force the module to be run again

SEE ALSO

Top

LATMOS::Accounts::SyncManager

AUTHOR

Top

Thauvin Olivier, <olivier.thauvin@latmos.ipsl.fr>

COPYRIGHT AND LICENSE

Top