From d5b3c2e3033142753a4fce841789beb70e006b56 Mon Sep 17 00:00:00 2001 From: Ben Rudolph Date: Fri, 23 Mar 2018 17:43:50 -0700 Subject: [PATCH] store results --- bonobo/contrib/django/commands.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bonobo/contrib/django/commands.py b/bonobo/contrib/django/commands.py index b54edd8..4edcd09 100644 --- a/bonobo/contrib/django/commands.py +++ b/bonobo/contrib/django/commands.py @@ -45,6 +45,7 @@ class ETLCommand(BaseCommand): self.logger.info(*args, **kwargs) def run(self, *args, **options): + results = [] with bonobo.parse_args(options) as options: services = self.get_services() graph_coll = self.get_graph(*args, **options) @@ -56,9 +57,12 @@ class ETLCommand(BaseCommand): assert isinstance(graph, bonobo.Graph), 'Invalid graph provided.' print(term.lightwhite('{}. {}'.format(i + 1, graph.name))) result = bonobo.run(graph, services=services) + results.append(result) print(term.lightblack(' ... return value: ' + str(result))) print() + return results + def handle(self, *args, **options): _stdout_backup, _stderr_backup = self.stdout, self.stderr