-
-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Agena3000 integration #6594
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some minor comments.
lib/ProductOpener/Images.pm
Outdated
if ($file =~ /\.($extensions)$/i) { | ||
$extension = lc($1) ; | ||
} | ||
if ($file =~ /\.($extensions)$/i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renaming $extensions to $supported_extensions would help improve readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, will do
my $filename = get_string_id_for_lang("no_language", remote_addr(). '_' . $`); | ||
} | ||
|
||
my $filename = get_string_id_for_lang("no_language", remote_addr(). '_' . $`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment ? I don't understand what we do here…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a comment, it's just a name for a temporary file, prefixed with the user ip address + a normalized version of the original file name uploaded by the user
$lock_path = "$product_www_root/images/products/$path/$imgid.lock"; | ||
} | ||
my $lock_path = "$product_www_root/images/products/$path/$imgid.lock"; | ||
while ((-e $lock_path) or (-e "$product_www_root/images/products/$path/$imgid.jpg")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we first search for max imgid already present, to avoid a long check on files (in my experience it can really degrade perfs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we first search for max imgid already present
withls
I mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure we could do that
|
||
rm -rf /srv2/off-pro/agena3000-data-tmp | ||
mkdir /srv2/off-pro/agena3000-data-tmp | ||
find /home/sftp/agena3000/RECETTE/Fiches/ -mtime -2 -type f -exec cp {} /srv2/off-pro/agena3000-data-tmp/ \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be sure not to miss an export, another way is to touch a file at the end, and use find with -newer
And if the file does not yet exists fallback to 2 days.
Co-authored-by: Alex Garel <alex@garel.org>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Part of #6537