(standup)
Ieri
Oggi
Blocking
Improvements
<?php | |
$productListing = new CircuitBreaker( | |
10, | |
function($searchKey) { | |
// $result is given from the api call | |
return $result; | |
} | |
); |
<?php | |
/** | |
* We're using a message bus, this is | |
* the fetch-car message handler. | |
*/ | |
class FetchCarMessageHandler | |
{ | |
public function handle(Message $msg) | |
{ |
<?php | |
class CircuitBreaker | |
{ | |
private $maxFailures; | |
private $service; | |
private $redisClient; | |
public function __construct(int $maxFailures, callable $service) | |
{ |
<?php | |
/** | |
* Assume that we're using a message bus which is able to | |
* retry failed messages with a custom retry delay. | |
*/ | |
class FetchCarMessageHandler | |
{ | |
public function handle(Message $msg) | |
{ |
(standup)
Ieri
Oggi
Blocking
Improvements
<?php | |
public function getAllIds() | |
{ | |
$expr = $this->_em->getExpressionBuilder(); | |
$rsm = new ResultSetMapping(); | |
$rsm->addScalarResult('id', 'id'); | |
$result = $this->_em->createNativeQuery(' | |
SELECT u.id as id FROM users u |
{ | |
"posts": [ | |
{ | |
"userId": 1, | |
"id": 1, | |
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", | |
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto" | |
}, | |
{ |
<?php | |
interface Iterator extends Traversable | |
{ | |
abstract public mixed current ( void ) | |
abstract public scalar key ( void ) | |
abstract public void next ( void ) | |
abstract public void rewind ( void ) | |
abstract public boolean valid ( void ) | |
} |
> const strategies = { | |
first: () => {}, | |
second: () => {}, | |
undefined: () => 'default' | |
}; | |
> const obj0 = { type: 'first' }; | |
> const obj1 = { }; |
$ docker-machine -D create -d vmwarefusion fusion | |
Creating SSH key... | |
Creating VM... | |
Creating disk '/Users/toretto/.docker/machine/machines/fusion/fusion.vmdk' | |
Virtual disk creation successful. | |
Starting fusion... | |
executing: /Applications/VMware Fusion.app/Contents/Library/vmrun start /Users/toretto/.docker/machine/machines/fusion/fusion.vmx nogui | |
Waiting for VM to come online... | |
MAC address in VMX: 00:0c:29:7f:47:32 | |
IP found in DHCP lease table: 192.168.2.129 |