* add method to list all results we wantz diz ...
@@ -121,6 +121,22 @@ from shell import Shell
from collections import OrderedDict, namedtuple
import importlib
from conf import taskq
+import types
+
+# monkey patch data store
+_list = "select * FROM {0}"
+def list_results(obj):
+ with obj._db.get_connection() as conn:
+ try:
+ return list(conn.execute(obj._list.format(obj.name)))
+ except:
+ return None
+taskq.result_store._list = _list
+taskq.result_store.list_results = types.MethodType(list_results,
+ taskq.result_store)
PythonCode = namedtuple('PythonCode', ['path', 'args', 'kwargs', 'code'])