Permalink
Browse files

Make pyon pids same as process ids

  • Loading branch information...
1 parent 66a6e2c commit 32bf2d936c4b2248a175afd4bd4603f8071ccb1b @oldpatricka oldpatricka committed Nov 5, 2012
Showing with 1 addition and 7 deletions.
  1. +1 −7 pidantic/pyon/pidpyon.py
View
8 pidantic/pyon/pidpyon.py
@@ -18,12 +18,6 @@
ProcessStateEnum = object()
-# _abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
-BASIC_VALID = "_%s%s" % (string.ascii_letters, string.digits)
-def create_valid_identifier(name, valid_chars=BASIC_VALID):
- return "id" + ''.join(c for c in name if c in valid_chars)
-
-
class PyonPidanticFactory(PidanticFactory):
driver_name = "pyon"
@@ -94,7 +88,7 @@ def get_pidantic(self, **kwargs):
if p not in self.run_needed_keywords and p not in self.run_optional_keywords:
raise PIDanticUsageException("The driver %s does not know the parameter %s." % (self.driver_name, p))
- kwargs['pyon_process_id'] = create_valid_identifier(kwargs['process_name'])
+ kwargs['pyon_process_id'], _round = kwargs['process_name'].split('-')
program_object = self._pyon.create_process_db(**kwargs)
pidpyon = PIDanticPyon(program_object, self._pyon, log=self._log, state_change_callback=self._pyon_process_state_change_callback)

0 comments on commit 32bf2d9

Please sign in to comment.