Methods summary
protected
boolean
|
#
preInit( )
Checks if it's ok to initialize a new process.
Checks if it's ok to initialize a new process.
Returns
boolean true if initialization can start
Overrides
|
public
|
|
private
|
|
protected
|
#
init( )
Initializes new process. Runs inside a transaction ($this->data and
$this->fd are accessible).
Initializes new process. Runs inside a transaction ($this->data and
$this->fd are accessible).
|
protected
boolean
|
#
step( )
Performs a small piece of work. Runs inside a transaction ($this->data and
$this->fd are accessible).
Performs a small piece of work. Runs inside a transaction ($this->data and
$this->fd are accessible).
The longer it takes to complete one step, the more time it is possible to
lose if script fails. The shorter, the more overhead there are because of
copying $this->data and $this->fd after each step. So, it should be
reasonably long and reasonably short at the same time. 5-10% of max execution
time is recommended.
$this->getStorage() session is already closed.
Returns
boolean false to end this Runner and call info(); true to continue.
|
protected
boolean
|
#
finish( mixed $filename )
Called when $this->isDone() is true $this->data is read-only,
$this->fd is not available.
Called when $this->isDone() is true $this->data is read-only,
$this->fd is not available.
$this->getStorage() session is already closed.
Parameters
- $filename
mixed $filename string full path to resulting file
Returns
boolean true to delete all process files; false to be able to access process again.
|
protected
boolean
|
#
isDone( )
Checks if there is any more work for $this->step() to do. Runs inside a
transaction ($this->data and $this->fd are accessible).
Checks if there is any more work for $this->step() to do. Runs inside a
transaction ($this->data and $this->fd are accessible).
$this->getStorage() session is already closed.
Returns
boolean whether all the work is done
|
protected
|
#
info( )
Called by a Messenger when the Runner is still alive, or when a Runner exited
voluntarily, but isDone() is still false.
Called by a Messenger when the Runner is still alive, or when a Runner exited
voluntarily, but isDone() is still false.
This function must send $this->processId to allow user to continue.
$this->data is read-only. $this->fd is not available.
Overrides
|
protected
|
#
restore( )
Called by a new Runner when the old one dies. Should be used to restore any
non-persistent data for $this->step() if needed. Runs inside a transaction
($this->data and $this->fd are accessible). $this->getStorage() session
is already closed.
Called by a new Runner when the old one dies. Should be used to restore any
non-persistent data for $this->step() if needed. Runs inside a transaction
($this->data and $this->fd are accessible). $this->getStorage() session
is already closed.
Overrides
|
private
blogImportPluginTransport
|
|