Skip to content

Commit

Permalink
Merge pull request #2203 from andresailer/SomeFixes
Browse files Browse the repository at this point in the history
[v6r11] Some fixes
  • Loading branch information
Andrei Tsaregorodtsev committed Dec 15, 2014
2 parents d987bba + fc04718 commit d3f8002
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Core/Utilities/InstallTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,7 @@ def installNewPortal():
result = execCommand( False, ["pip", "install", "tornado"] )
if not result['OK']:
error = "Tornado can not be installed:%s" % result['Value']
gLogger.erro(error)
gLogger.error(error)
DIRAC.exit(-1)
return error
else:
Expand Down
4 changes: 2 additions & 2 deletions Core/Workflow/Workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def createStepInstance( self, type, name ):
raise KeyError( 'Can not find StepDefinition ' + type + ' to create StepInstrance ' + name )

def removeStepInstance( self, name ):
self.instances[name].setParents( None )
self.instances.delete( name )
self.step_instances[name].setParent( None )
self.step_instances.delete( name )

def updateParents( self ):
self.module_definitions.updateParents( self )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ def _getDirectoryPhysicalSizeFromUsage( self, lfns, connection ):
req = 'DELETE FROM FC_DirectoryUsage WHERE SEID=%d AND DirID=%d' % ( seID, dirID )
result = self.db._update( req )
if not result['OK']:
gLogger( 'Failed to delete entry from FC_DirectoryUsage', result['Message'] )
gLogger.error( 'Failed to delete entry from FC_DirectoryUsage', result['Message'] )
seDict['TotalSize'] = int( totalSize )
seDict['TotalFiles'] = int( totalFiles )
successful[path] = seDict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,17 @@
lfnMetadata = res['Value']['Successful']

for lfn in lfnMetadata:
rarFile = File()
rarFile.LFN = lfn
rarFile.Size = lfnMetadata[lfn]['Size']
rarFile.Checksum = lfnMetadata[lfn]['Checksum']
rarFile.GUID = lfnMetadata[lfn]['GUID']
rarFile.ChecksumType = 'ADLER32'
replicateAndRegister.addFile( rarFile )
try:
rarFile = File()
rarFile.LFN = lfn
rarFile.Size = lfnMetadata[lfn]['Size']
rarFile.Checksum = lfnMetadata[lfn]['Checksum']
rarFile.GUID = lfnMetadata[lfn]['GUID']
rarFile.ChecksumType = 'ADLER32'
replicateAndRegister.addFile( rarFile )
except ValueError as err:
print "Error", str(err), lfn
continue

oRequest.addOperation( replicateAndRegister )
isValid = gRequestValidator.validate( oRequest )
Expand Down
4 changes: 2 additions & 2 deletions Workflow/Modules/ModuleBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ def execute( self ):

if not self.production_id:
# self.PRODUCTION_ID is always set by the workflow
self.production_id = int( self.PRODUCTION_ID )
self.production_id = int( self.workflow_commons['PRODUCTION_ID'] )

if not self.prod_job_id:
# self.JOB_ID is set by the workflow, but this is not the WMS job id, but the transformation (production) task id
self.prod_job_id = int( self.JOB_ID )
self.prod_job_id = int( self.workflow_commons['JOB_ID'] )

if not self.jobID:
# this is the real wms job ID
Expand Down

0 comments on commit d3f8002

Please sign in to comment.