aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main/java/io/trygvis/CreateArticleCallable.java2
-rwxr-xr-xsrc/main/java/io/trygvis/Main.java2
-rwxr-xr-xsrc/main/java/io/trygvis/UpdateArticleCallable.java2
-rwxr-xr-xsrc/main/java/io/trygvis/async/AsyncService.java (renamed from src/main/java/io/trygvis/queue/AsyncService.java)7
-rw-r--r--src/main/java/io/trygvis/async/JdbcAsyncService.java (renamed from src/main/java/io/trygvis/queue/JdbcAsyncService.java)6
-rw-r--r--src/main/java/io/trygvis/async/QueueThread.java (renamed from src/main/java/io/trygvis/queue/QueueThread.java)5
-rw-r--r--src/main/java/io/trygvis/async/TaskFailureException.java (renamed from src/main/java/io/trygvis/queue/TaskFailureException.java)2
-rwxr-xr-xsrc/main/java/io/trygvis/queue/Task.java2
8 files changed, 20 insertions, 8 deletions
diff --git a/src/main/java/io/trygvis/CreateArticleCallable.java b/src/main/java/io/trygvis/CreateArticleCallable.java
index 420a5b5..471b59d 100755
--- a/src/main/java/io/trygvis/CreateArticleCallable.java
+++ b/src/main/java/io/trygvis/CreateArticleCallable.java
@@ -1,7 +1,7 @@
package io.trygvis;
import io.trygvis.model.Article;
-import io.trygvis.queue.AsyncService;
+import io.trygvis.async.AsyncService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
diff --git a/src/main/java/io/trygvis/Main.java b/src/main/java/io/trygvis/Main.java
index d22cab2..08b9b75 100755
--- a/src/main/java/io/trygvis/Main.java
+++ b/src/main/java/io/trygvis/Main.java
@@ -1,6 +1,6 @@
package io.trygvis;
-import io.trygvis.queue.AsyncService;
+import io.trygvis.async.AsyncService;
import io.trygvis.queue.Queue;
import io.trygvis.queue.Task;
import org.hibernate.dialect.PostgreSQL82Dialect;
diff --git a/src/main/java/io/trygvis/UpdateArticleCallable.java b/src/main/java/io/trygvis/UpdateArticleCallable.java
index f1ea0e2..a910855 100755
--- a/src/main/java/io/trygvis/UpdateArticleCallable.java
+++ b/src/main/java/io/trygvis/UpdateArticleCallable.java
@@ -1,6 +1,6 @@
package io.trygvis;
-import io.trygvis.queue.AsyncService;
+import io.trygvis.async.AsyncService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
diff --git a/src/main/java/io/trygvis/queue/AsyncService.java b/src/main/java/io/trygvis/async/AsyncService.java
index c9e5861..e90a0e4 100755
--- a/src/main/java/io/trygvis/queue/AsyncService.java
+++ b/src/main/java/io/trygvis/async/AsyncService.java
@@ -1,9 +1,14 @@
-package io.trygvis.queue;
+package io.trygvis.async;
+import io.trygvis.queue.Queue;
+import io.trygvis.queue.Task;
import org.quartz.SchedulerException;
import java.util.List;
+/**
+ * A simple framework for running tasks.
+ */
public interface AsyncService {
/**
diff --git a/src/main/java/io/trygvis/queue/JdbcAsyncService.java b/src/main/java/io/trygvis/async/JdbcAsyncService.java
index 276541f..4e78a37 100644
--- a/src/main/java/io/trygvis/queue/JdbcAsyncService.java
+++ b/src/main/java/io/trygvis/async/JdbcAsyncService.java
@@ -1,5 +1,9 @@
-package io.trygvis.queue;
+package io.trygvis.async;
+import io.trygvis.queue.Queue;
+import io.trygvis.queue.QueueDao;
+import io.trygvis.queue.Task;
+import io.trygvis.queue.TaskDao;
import org.quartz.SchedulerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/main/java/io/trygvis/queue/QueueThread.java b/src/main/java/io/trygvis/async/QueueThread.java
index a981c7e..69466df 100644
--- a/src/main/java/io/trygvis/queue/QueueThread.java
+++ b/src/main/java/io/trygvis/async/QueueThread.java
@@ -1,5 +1,8 @@
-package io.trygvis.queue;
+package io.trygvis.async;
+import io.trygvis.queue.Queue;
+import io.trygvis.queue.Task;
+import io.trygvis.queue.TaskDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.TransactionException;
diff --git a/src/main/java/io/trygvis/queue/TaskFailureException.java b/src/main/java/io/trygvis/async/TaskFailureException.java
index d3d8c48..7278e17 100644
--- a/src/main/java/io/trygvis/queue/TaskFailureException.java
+++ b/src/main/java/io/trygvis/async/TaskFailureException.java
@@ -1,4 +1,4 @@
-package io.trygvis.queue;
+package io.trygvis.async;
class TaskFailureException extends RuntimeException {
public TaskFailureException(Exception e) {
diff --git a/src/main/java/io/trygvis/queue/Task.java b/src/main/java/io/trygvis/queue/Task.java
index 09d5060..2b1103b 100755
--- a/src/main/java/io/trygvis/queue/Task.java
+++ b/src/main/java/io/trygvis/queue/Task.java
@@ -21,7 +21,7 @@ public class Task {
public final List<String> arguments;
- Task(long id, Long parent, String queue, Date scheduled, Date lastRun, int runCount, Date completed, List<String> arguments) {
+ public Task(long id, Long parent, String queue, Date scheduled, Date lastRun, int runCount, Date completed, List<String> arguments) {
this.id = id;
this.parent = parent;
this.queue = queue;