Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
diff --git a/demo/ b/demo/
index 8d4a236..e80bf39 100644
--- a/demo/
+++ b/demo/
@@ -5,6 +5,7 @@
# of patent rights can be found in the PATENTS file in the same directory.
from six.moves import xrange
+from sparts.sparts import option
from sparts.tasks.periodic import PeriodicTask
from sparts.tasks.queue import QueueTask
from sparts.vservice import VService
@@ -23,6 +24,10 @@ class Producer(PeriodicTask):
DEPS = [Consumer]
+ foobar = option(
+ default=[],
+ nargs='*',
+ )
def initTask(self):
super(Producer, self).initTask()
self.consumer = self.service.tasks.Consumer
@@ -32,6 +37,7 @@ class Producer(PeriodicTask):
item = random.random()
self.consumer.queue.put(item)"Producer put %s into queue", item)
+"option foobar type: {} value: {}".format(type(self.foobar), self.foobar))
class ProducerConsumer(VService):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.