mirror of https://github.com/reiseburo/whoas
Removed the re-throw in the pop routines for in-memory and redis queue
References #9 and #23
This commit is contained in:
parent
1f623174b1
commit
1a232c2553
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:01 EDT 2015 -->
|
||||
<title>AbstractHookQueue (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:01 EDT 2015 -->
|
||||
<title>AbstractHookRunner (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:01 EDT 2015 -->
|
||||
<title>HookRequest (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:01 EDT 2015 -->
|
||||
<title>InMemoryQueue (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
|
||||
<title>Publisher (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
|
||||
<title>RedisQueue (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
|
||||
<title>SequentialHookRunner (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
|
||||
<title>WhoasConfiguration (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
|
||||
<title>WhoasFactory (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by groovydoc (2.4.0) on Tue Mar 24 13:53:10 EDT 2015 -->
|
||||
<!-- Generated by groovydoc (2.4.0) on Wed Mar 25 14:03:02 EDT 2015 -->
|
||||
<title>WhoasQueueConfig (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<!-- Generated by groovydoc (2.4.0) on -->
|
||||
<title>Deprecated API (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="groovy.ico" type="image/x-icon" rel="icon">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<title>API Help (whoas 0.1.5 API)</title>
|
||||
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
|
||||
<link href="groovy.ico" type="image/x-icon" rel="icon">
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body class="center">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<!-- Generated by groovydoc (2.4.0) on -->
|
||||
<title>Index (whoas 0.1.5 API)</title>
|
||||
<meta name="date" content="2015-03-24">
|
||||
<meta name="date" content="2015-03-25">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body class="center">
|
||||
|
|
|
@ -63,7 +63,6 @@ class InMemoryQueue extends AbstractHookQueue {
|
|||
/* Put this back on the tail end of the queue */
|
||||
logger.info("\"Pop\" on in-memory queue failed, putting it back on the tail-end", ex)
|
||||
this.internalQueue.put(item)
|
||||
throw ex
|
||||
}
|
||||
finally {
|
||||
}
|
||||
|
|
|
@ -129,7 +129,6 @@ class RedisQueue extends AbstractHookQueue {
|
|||
/* Put this back on the front of the queue */
|
||||
logger.info("\"Pop\" on redis queue failed, pushing it back on front of the queue", ex)
|
||||
redisClient.lpush(this.queueConfig.key, messages.get(1))
|
||||
throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,14 +79,13 @@ class InMemoryQueueSpecWithMessage extends InMemoryQueueWithGivenQueueSpec {
|
|||
receivedMessage
|
||||
}
|
||||
|
||||
def "pop() should requeue on exceptions and throw exception again"() {
|
||||
def "pop() should requeue on exceptions"() {
|
||||
when:
|
||||
queue.pop {
|
||||
throw new Exception("Spock'd!")
|
||||
}
|
||||
|
||||
then:
|
||||
thrown Exception
|
||||
queue.size == 1
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,6 @@ class RedisQueueSpec extends Specification {
|
|||
queue.pop() { throw new Exception("Test Exception") }
|
||||
|
||||
then:
|
||||
thrown Exception
|
||||
queue.getSize() == 1
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue