My favorites
▼
|
Sign in
plushcode
Public projects and tutorials from Jim Plush
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
stability_patterns
/
circuit_breaker
/
test.php
‹r8
r23
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
require_once('CircuitBreaker.php');
$cb = new CircuitBreaker('myapp');
$cb->logging = true;
if($cb->isClosed()) {
if(!$res = @file_get_contents("http://litfuel.net/tutorials/testserver.php")) {
$cb->fail();
} else {
$cb->success();
}
var_dump($res);
} else {
echo 'CIRCUIT TRIPPED! NO CALLS MADE';
return false;
}
?>
Show details
Hide details
Change log
r9
by JimInOC on Apr 8, 2009
Diff
adding schema
Go to:
...terns/circuit_breaker/schema.sql
...atterns/circuit_breaker/test.php
Project members,
sign in
to write a code review
Older revisions
r8
by JimInOC on Apr 8, 2009
Diff
updating
r7
by JimInOC on Apr 8, 2009
Diff
updating
r6
by JimInOC on Apr 8, 2009
Diff
initial checkin
All revisions of this file
File info
Size: 339 bytes, 23 lines
View raw file
File properties
svn:eol-style
native
Powered by
Google Project Hosting