Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Run Pyon spawn_process calls in a greenlet

  • Loading branch information...
commit bb4ba9f44963e1df0a789c1ec7176bb8faf6faa2 1 parent 8390c52
@oldpatricka oldpatricka authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 pidantic/pyon/
10 pidantic/pyon/
@@ -6,12 +6,14 @@
from imp import load_source
from urllib import urlretrieve
from uuid import uuid4
+from gevent import spawn
from eeagent.util import unmake_id
from pidantic.pyon.persistence import PyonDataObject, PyonProcDataObject
from pidantic.pidantic_exceptions import PIDanticUsageException, PIDanticExecutionException
def proc_manager_lock(func):
def call(self, *args, **kwargs):
@@ -89,8 +91,14 @@ def create_process_db(self, **kwargs):
return process_object
- def run_process(self, process_object):
+ def run_process(self, process_object, async=True):
+ if async:
+ spawn(self._run_process, process_object)
+ else:
+ return self._run_process(process_object)
+ def _run_process(self, process_object):
config = yaml.load(process_object.config)
except AttributeError:

0 comments on commit bb4ba9f

Please sign in to comment.
Something went wrong with that request. Please try again.