--- a/Allura/allura/model/monq_model.py
+++ b/Allura/allura/model/monq_model.py
@@ -147,7 +147,7 @@
         return obj
 
     @classmethod
-    def get(cls, process='worker', state='ready', waitfunc=None):
+    def get(cls, process='worker', state='ready', waitfunc=None, only=None, exclude=None):
         '''Get the highest-priority, oldest, ready task and lock it to the
         current process.  If no task is available and waitfunc is supplied, call
         the waitfunc before trying to get the task again.  If waitfunc is None
@@ -158,8 +158,17 @@
                 ('time_queue', ming.ASCENDING)]
         while True:
             try:
+                query = dict(state=state)
+                if only:
+                    query['task_name'] = {'$in': only}
+                if exclude:
+                    nin = {'$nin': exclude}
+                    if 'task_name' not in query:
+                        query['task_name'] = nin
+                    else:
+                        query['task_name'] = {'$and': [query['task_name'], nin]}
                 obj = cls.query.find_and_modify(
-                    query=dict(state=state),
+                    query=query,
                     update={
                         '$set': dict(
                             state='busy',