Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make pyon pids same as process ids

  • Loading branch information...
commit 32bf2d936c4b2248a175afd4bd4603f8071ccb1b 1 parent 66a6e2c
Patrick Armstrong authored November 05, 2012

Showing 1 changed file with 1 addition and 7 deletions. Show diff stats Hide diff stats

  1. 8  pidantic/pyon/pidpyon.py
8  pidantic/pyon/pidpyon.py
@@ -18,12 +18,6 @@
18 18
     ProcessStateEnum = object()
19 19
 
20 20
 
21  
-# _abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
22  
-BASIC_VALID = "_%s%s" % (string.ascii_letters, string.digits)
23  
-def create_valid_identifier(name, valid_chars=BASIC_VALID):
24  
-    return "id" + ''.join(c for c in name if c in valid_chars)
25  
-
26  
-
27 21
 class PyonPidanticFactory(PidanticFactory):
28 22
 
29 23
     driver_name = "pyon"
@@ -94,7 +88,7 @@ def get_pidantic(self, **kwargs):
94 88
             if p not in self.run_needed_keywords and p not in self.run_optional_keywords:
95 89
                 raise PIDanticUsageException("The driver %s does not know the parameter %s." % (self.driver_name, p))
96 90
 
97  
-        kwargs['pyon_process_id'] = create_valid_identifier(kwargs['process_name'])
  91
+        kwargs['pyon_process_id'], _round = kwargs['process_name'].split('-')
98 92
         program_object = self._pyon.create_process_db(**kwargs)
99 93
 
100 94
         pidpyon = PIDanticPyon(program_object, self._pyon, log=self._log, state_change_callback=self._pyon_process_state_change_callback)

0 notes on commit 32bf2d9

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