Skip to content

Conversation

@MounaSafiHarab
Copy link
Contributor

@MounaSafiHarab MounaSafiHarab commented Sep 21, 2016

This is to be in line with:
aces/Loris#2100
in the Loris 16.1 release

Usage details are here:
#133

@gluneau
Copy link
Contributor

gluneau commented Oct 19, 2016

Can you add a usage section?

./batch_uploads_imageuploader                                                                                                                 
Use of uninitialized value $profile in concatenation (.) or string at ./batch_uploads_imageuploader line 33.
DBI connect('database=;host=;port=3306;','',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /data/ibis/bin/mri/uploadNeuroDB/NeuroDB/DBI.pm line 52.
DB connection failed
DBI Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

May be something else is missing...

./batch_uploads_imageuploader -profile prod                                                                                                     
Possible unintended interpolation of @gmail in string at /data/ibis/bin/mri/dicom-archive/.loris_mri/prod line 36.
Use of uninitialized value $_ in pattern match (m//) at /data/ibis/bin/mri/batch_uploads_imageuploader line 50.

@MounaSafiHarab
Copy link
Contributor Author

@gluneau

Added the help section.
You need to give this file a stdin input (text file with one entry per line for a scan to be inserted).
The help section now tells you all this (it was initially documented in: #133)

@MounaSafiHarab
Copy link
Contributor Author

@gluneau

Usage sections prints now without the -help

@MounaSafiHarab MounaSafiHarab added this to the 17.0 milestone Oct 27, 2016
exit 2;
}

if ( !$ARGV[0] || !$profile ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!$ARGV[0] || is not required

@gluneau
Copy link
Contributor

gluneau commented Oct 27, 2016

Setting $profile = ''; instead of $profile = undef will prevent this error when -profile is not used:
Use of uninitialized value $profile in concatenation (.) or string at ./batch_uploads_imageuploader line 57.

@MounaSafiHarab
Copy link
Contributor Author

@gluneau

your requested changes are done. Thanks!

@gluneau gluneau added PassedCodeReview Category: Feature PR or issue that aims to introduce a new feature labels Oct 28, 2016
@gluneau
Copy link
Contributor

gluneau commented Oct 28, 2016

Tested with:

lorisadmin@greg:/data/ibis/bin/mri% more list_of_scans.txt
/data/not_backed_up/ibis_fix_dcm/UNC1041_692620_V12_HOS2.zip N UNC1041_692620_V12
/data/not_backed_up/ibis_fix_dcm/UNC1047_837004_V06_HOS2.zip N UNC1047_837004_V06

}
if ($phantom eq 'N') {
if ($base ne $patientname) {
if ($patientname ne (substr ($base, 0, length($patientname)))) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to use regular expression

@MounaSafiHarab MounaSafiHarab merged commit 9325a3e into aces:17.0-dev Oct 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Feature PR or issue that aims to introduce a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants