Skip to content
Snippets Groups Projects
Commit 7aeb3c59 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

Removed obsoleted function

parent 1d22d67b
No related branches found
No related tags found
No related merge requests found
......@@ -113,23 +113,6 @@ class D2DTransferType(object):
raise ValueError('Invalid replication type %s' % strType)
def getProcessStartTime(pid):
'''Little utility able to get the start time of a process
Note that this is linux specific code'''
timeasstr = subprocess.Popen(['ps', '-o', 'etime=', '-p', str(pid)],
stdout=subprocess.PIPE).stdout.read().strip()
m = re.match('(?:(?:(\\d+)?-)?(\\d+):)?(\\d+):(\\d+)', timeasstr)
if m:
elapsed = int(m.group(3))*60+int(m.group(4))
if m.group(1):
elapsed += int(m.group(1))*86400
if m.group(2):
elapsed += int(m.group(2))*3600
return time.time() - elapsed
else:
raise ValueError('No such process')
def cmdLineToTransfer(cmdLine, scheduler, pid):
'''creates a RunningTransfer object from the command line that launched the transfer.
Depending on the command, the appropriate type of transfer will be created inside the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment