@@ -25,30 +25,49 @@ Config example:
2525
2626``` json
2727{
28- "test" : { /* name of retry */
29- "exception" : " ApacheBorys\\ Retry\\ Tests\\ Functional\\ Exceptions\\ Mock" , /* what type of Exception we would like to retry */
30- "maxRetries" : 4 , /* how many tries we should do */
28+ /**
29+ * here we can define declarator what should register exception handling callback function, if you are plan to use
30+ * standard php function set_exception_handler - you can ignore that section. StandardHandlerExceptionDeclarator is default
31+ **/
32+ "handlerExceptionDefiner" : {
33+ "class" : " ApacheBorys\\ Retry\\ HandlerExceptionDefiner\\ StandardHandlerExceptionDeclarator" ,
34+ "arguments" : []
35+ },
36+ "items" : {
37+ "test" : {
38+ /* name of retry */
39+ "exception" : " ApacheBorys\\ Retry\\ Tests\\ Functional\\ Exceptions\\ Mock" ,
40+ /* what type of Exception we would like to retry */
41+ "maxRetries" : 4 ,
42+ /* how many tries we should do */
3143 /* here we are describing formula, how next execution time should be calculated. Calculated amount will be added to current time */
32- "formula" : [
33- {
34- "operator" : " +" , /* here available *, -, + and / operators */
35- "argument" : " QTY_TRIES" /* you can use QTY_TRIES operator or any integer value */
36- },
37- {
38- "operator" : " *" ,
39- "argument" : " 5"
40- }
44+ "formula" : [
45+ {
46+ "operator" : " +" ,
47+ /* here available *, -, + and / operators */
48+ "argument" : " QTY_TRIES"
49+ /* you can use QTY_TRIES operator or any integer value */
50+ },
51+ {
52+ "operator" : " *" ,
53+ "argument" : " 5"
54+ }
4155 ],
42- "transport" : { /* here you should define, what kind of transport you would use to deliver re-try messages to worker */
43- "class" : " ApacheBorys\\ Retry\\ Tests\\ Functional\\ Transport\\ FileTransportForTests" ,
44- "arguments" : [ /* each specific transport could have own arguments in constructor. Here you should define it */
45- " tests\/ transport.data"
46- ]
56+ "transport" : {
57+ /* here you should define, what kind of transport you would use to deliver re-try messages to worker */
58+ "class" : " ApacheBorys\\ Retry\\ Tests\\ Functional\\ Transport\\ FileTransportForTests" ,
59+ "arguments" : [
60+ /* each specific transport could have own arguments in constructor. Here you should define it */
61+ " tests\/ transport.data"
62+ ]
4763 },
48- "executor" : { /* here you should define, what kind of executor you would use to perform re-try action */
49- "class" : " ApacheBorys\\ Retry\\ Tests\\ Functional\\ Executor\\ Runtime" ,
50- "arguments" : [] /* each specific executor could have own arguments in constructor. Here you should define it */
64+ "executor" : {
65+ /* here you should define, what kind of executor you would use to perform re-try action */
66+ "class" : " ApacheBorys\\ Retry\\ Tests\\ Functional\\ Executor\\ Runtime" ,
67+ "arguments" : []
68+ /* each specific executor could have own arguments in constructor. Here you should define it */
5169 }
70+ }
5271 }
5372}
5473```
0 commit comments