Skip to content

Neater APIs and Improved Supervision Features.

Latest
Compare
Choose a tag to compare
@bigbigant bigbigant released this 26 Mar 07:49
· 27 commits to master since this release

It's incompatible with v0.3.x.

Namespaces

The namespace prefix was changed to Comos\Qpm.
All namespaces are capitalized.
The directories are simplified.
It still follows the PSR-4 but more closely.
The changes of directory structures and name of packages:

  • qpm\logger (library/qpm/logger) -> Comos\Qpm\Log (src/Log)
  • qpm\supervisor (library/qpm/supervisor) -> Comos\Qpm\Supervision (src/Supervision)
  • process (library/qpm/process) -> Process (src/Process)
  • pidfile (library/qpm/pidfile) -> Pid (src/Pid)

Process

Removed MainProcess class.
Process::fork() is a static method now.
In old version, forking looks like follows:

Process::current()->fork($runnableInstance);
//or
Process::current()->forkByCallable($callback);

In current version, forking looks like this:

Process::fork($runnableInstance);
//or
Process::fork($callback);

# Supervision
Added "timeout" and "onTimeout" options to OneForOne mode in Supervisor.
Added "termTimeout" option to all modes of Supervisor.