Skip to content

Commit

Permalink
Fix in scheduler's exception handling on its exit, additional unit te…
Browse files Browse the repository at this point in the history
…sts, first scheduler discipline added
  • Loading branch information
aargoth committed Mar 13, 2017
1 parent 573de30 commit c737042
Show file tree
Hide file tree
Showing 14 changed files with 325 additions and 176 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/artur-graniszewski/ZEUS-for-PHP.svg?branch=master)](https://travis-ci.org/artur-graniszewski/ZEUS-for-PHP) [![Coverage Status](https://coveralls.io/repos/github/artur-graniszewski/ZEUS-for-PHP/badge.svg?branch=master)](https://coveralls.io/github/artur-graniszewski/ZEUS-for-PHP?branch=master)
[![Build Status](https://travis-ci.org/artur-graniszewski/ZEUS-for-PHP.svg?branch=master)](https://travis-ci.org/artur-graniszewski/ZEUS-for-PHP) [![Coverage Status](https://coveralls.io/repos/github/artur-graniszewski/ZEUS-for-PHP/badge.svg?branch=master)](https://coveralls.io/github/artur-graniszewski/ZEUS-for-PHP?branch=master) [![Code Climate](https://codeclimate.com/github/artur-graniszewski/ZEUS-for-PHP/badges/gpa.svg)](https://codeclimate.com/github/artur-graniszewski/ZEUS-for-PHP)

# Introduction

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static function isSupported($throwException = false)
*/
public function onProcessTerminate(EventInterface $event)
{
$this->terminateTask($event->getParam('uid'), $event->getParam('soft'));
$this->terminateProcess($event->getParam('uid'), $event->getParam('soft'));
}

/**
Expand Down Expand Up @@ -225,7 +225,7 @@ public function onSchedulerInit()
* @param bool|false $useSoftTermination
* @return $this
*/
protected function terminateTask($pid, $useSoftTermination = false)
protected function terminateProcess($pid, $useSoftTermination = false)
{
$this->getPcntlBridge()->posixKill($pid, $useSoftTermination ? SIGINT : SIGKILL);

Expand All @@ -236,9 +236,9 @@ protected function terminateTask($pid, $useSoftTermination = false)
* @param bool|false $useSoftTermination
* @return $this
*/
public function terminateAllTasks($useSoftTermination = false)
public function terminateAllProcesses($useSoftTermination = false)
{
return $this->terminateTask(0, $useSoftTermination);
return $this->terminateProcess(0, $useSoftTermination);
}

/**
Expand Down
10 changes: 5 additions & 5 deletions src/Zeus/Kernel/ProcessManager/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class Process
protected $status;

/** @var string */
protected $id;
protected $processId;

/** @var EventManagerInterface */
protected $events;
Expand All @@ -30,12 +30,12 @@ final class Process
protected $event;

/**
* @param string $uid
* @param string $processId
* @return $this
*/
public function setId($uid)
public function setId($processId)
{
$this->id = $uid;
$this->processId = $processId;

return $this;
}
Expand Down Expand Up @@ -241,7 +241,7 @@ public function mainLoop()
*/
public function getId()
{
return $this->id;
return $this->processId;
}

/**
Expand Down
Loading

0 comments on commit c737042

Please sign in to comment.