public function WSServer::getDegraded in Web Service Data 8
Same name and namespace in other branches
- 2.0.x src/Entity/WSServer.php \Drupal\wsdata\Entity\WSServer::getDegraded()
Cause the WSServer to become degraded.
Overrides WSServerInterface::getDegraded
File
- src/
Entity/ WSServer.php, line 189
Class
- WSServer
- Defines the Web Service Server entity.
Namespace
Drupal\wsdata\EntityCode
public function getDegraded() {
if (!isset($this->state['degraded_backoff'])) {
$this->state['degraded_backoff'] = wsserver::$WSCONFIG_DEFAULT_DEGRADED_BACKOFF;
}
if (isset($this->state['degraded'])) {
return $this->state['degraded'] - time() + $this->state['degraded_backoff'];
}
return 0;
}