Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
1c26ea26
Commit
1c26ea26
authored
13 years ago
by
tpylak
Browse files
Options
Downloads
Patches
Plain Diff
SE-352 sanofi dropboxes: merge changes done by Matt, format emails better
SVN: 22152
parent
e4c597ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sanofi/dist/etc/sanofi-dropbox/dropbox-all-in-one-with-library.py
+36
-46
36 additions, 46 deletions
...ist/etc/sanofi-dropbox/dropbox-all-in-one-with-library.py
sanofi/dist/etc/sanofi-dropbox/plateinitializer.py
+1
-1
1 addition, 1 deletion
sanofi/dist/etc/sanofi-dropbox/plateinitializer.py
with
37 additions
and
47 deletions
sanofi/dist/etc/sanofi-dropbox/dropbox-all-in-one-with-library.py
+
36
−
46
View file @
1c26ea26
...
...
@@ -27,7 +27,7 @@ reload(plateinit)
TEST_MODE
=
False
"""
the url of the Sanofi
'
s openBIS installation
"""
OPENBIS_URL
=
"
http
s
://bwl27.
sanofi-aventis.com:8443
/openbis
"
OPENBIS_URL
=
"
http://bw
d
l27.
bw.f2.enterprise:8080
/openbis
"
EXPERIMENT_RECIPIENTS_PROPCODE
=
"
OBSERVER_EMAILS
"
...
...
@@ -104,17 +104,14 @@ def commit_transaction(service, transaction):
incomingFileName
=
incoming
.
getName
()
plateLink
=
createPlateLink
(
OPENBIS_URL
,
plateCode
)
sendEmail
(
"
openBIS: New data registered for %s
"
%
(
plateCode
),
"""
Dear openBIS user,
New data from folder
'
%(incomingFileName)s
'
has been successfully registered for plate %(plateLink)s.
sendEmail
(
"
openBIS: New data registered for %s
"
%
(
plateCode
),
"""
Dear openBIS user,
New data from folder
'
%(incomingFileName)s
'
has been successfully registered for plate %(plateLink)s.
This email has been generated automatically.
Have a nice day!
This email has been generated automatically.
Administrator
"""
%
vars
(),
getAllEmailRecipients
())
Have a nice day!
Administrator
"""
%
vars
(),
getAllEmailRecipients
())
def
rollback_service
(
service
,
ex
):
if
isUserError
(
ex
):
...
...
@@ -134,61 +131,54 @@ def sendUserError(service, errorDetails, recipients):
incomingFileName
=
incoming
.
getName
()
if
localPlateCode
:
sendEmail
(
"
openBIS: Data registration failed for %s
"
%
(
localPlateCode
),
"""
Dear openBIS user,
Registering new data for plate %(localPlateCode)s has failed with error
'
%(errorDetails)s
'
.
The name of the incoming folder
'
%(incomingFileName)s
'
was added to
'
.faulty_paths
'
. Please,
repair the problem and remove the entry from
'
.faulty_paths
'
to retry registration.
sendEmail
(
"
openBIS: Data registration failed for %s
"
%
(
localPlateCode
),
"""
Dear openBIS user,
Registering new data for plate %(localPlateCode)s has failed with error
'
%(errorDetails)s
'
.
The name of the incoming folder
'
%(incomingFileName)s
'
was added to
'
.faulty_paths
'
. Please,
repair the problem and remove the entry from
'
.faulty_paths
'
to retry registration.
This email has been generated automatically.
This email has been generated automatically.
Administrator
"""
%
vars
(),
recipients
)
Administrator
"""
%
vars
(),
recipients
)
else
:
sendEmail
(
"
openBIS: Data registration failed for folder
'
%s
'"
%
(
incomingFileName
),
"""
Dear openBIS user,
openBIS was unable to understand the name of an incoming folder.
Detailed error message was
'
%(errorDetails)s
'
.
sendEmail
(
"
openBIS: Data registration failed for folder
'
%s
'"
%
(
incomingFileName
),
"""
Dear openBIS user,
openBIS was unable to understand the name of an incoming folder.
Detailed error message was
'
%(errorDetails)s
'
.
This email has been generated automatically.
This email has been generated automatically.
Administrator
"""
%
vars
(),
recipients
)
Administrator
"""
%
vars
(),
recipients
)
def
sendAdminError
(
service
,
errorDetails
,
recipients
):
incomingFileName
=
incoming
.
getName
()
sendEmail
(
"
openBIS System Error: Data registration failed for %s
"
%
(
incomingFileName
),
"""
Dear openBIS Administrator,
sendEmail
(
"
openBIS System Error: Data registration failed for %s
"
%
(
incomingFileName
),
"""
Dear openBIS Administrator,
The registration of data sets from incoming folder
'
%(incomingFileName)s
'
has failed
in an unexpected way. The most probable cause is a misconfiguration of the system. It may be also a bug.
Here is a full description of the encountered error:
The registration of data sets from incoming folder
'
%(incomingFileName)s
'
has failed
in an unexpected way. The most probable cause is a misconfiguration of the system. It may be also a bug.
Here is a full description of the encountered error:
%(errorDetails)s
%(errorDetails)s
Please, repair the problem and remove the entry from
'
.faulty_paths
'
to retry registration.
Please, repair the problem and remove the entry from
'
.faulty_paths
'
to retry registration.
openBIS
"""
%
vars
(),
recipients
)
openBIS
"""
%
vars
(),
recipients
)
def
sendSystemErrorNotificationToUser
(
service
,
recipients
):
incomingFileName
=
incoming
.
getName
()
sendEmail
(
"
openBIS: Data registration failed for folder
'
%s
'"
%
(
incomingFileName
),
"""
Dear openBIS user,
Registering new data from incoming folder
'
%(incomingFileName)s
'
has failed due to a system error.
sendEmail
(
"
openBIS: Data registration failed for folder
'
%s
'"
%
(
incomingFileName
),
"""
Dear openBIS user,
Registering new data from incoming folder
'
%(incomingFileName)s
'
has failed due to a system error.
openBIS has sent a notification to the responsible system administrators and they should be
fixing the problem as soon as possible.
openBIS has sent a notification to the responsible system administrators and they should be
fixing the problem as soon as possible.
We are sorry for any inconveniences this may have caused.
We are sorry for any inconveniences this may have caused.
openBIS Administrators
"""
%
vars
(),
recipients
)
openBIS Administrators
"""
%
vars
(),
recipients
)
def
sendEmail
(
title
,
content
,
recipients
):
global
experiment
...
...
@@ -210,7 +200,7 @@ def sendEmail(title, content, recipients):
state
.
mailClient
.
sendMessage
(
title
,
content
,
replyTo
,
fromAddress
,
recipients
)
def
createPlateLink
(
openbisUrl
,
code
):
return
"
<a href=
'
%(openbisUrl)s#entity=SAMPLE&sample_type=PLATE&action=SEARCH&code=%(code)s
'
>%(code)s</a>
"
%
vars
()
return
"
%(openbisUrl)s#entity=SAMPLE&sample_type=PLATE&action=SEARCH&code=%(code)s
"
%
vars
()
def
findPlateByCode
(
transaction
,
code
):
"""
...
...
This diff is collapsed.
Click to expand it.
sanofi/dist/etc/sanofi-dropbox/plateinitializer.py
+
1
−
1
View file @
1c26ea26
...
...
@@ -50,7 +50,7 @@ class PlateInitializer:
POSITIVE_CONTROL_TYPE
=
"
POSITIVE_CONTROL
"
NEGATIVE_CONTROL_TYPE
=
"
NEGATIVE_CONTROL
"
COMPOUND_WELL_TYPE
=
"
COMPOUND_WELL
"
COMPOUND_WELL_TYPE
=
"
COMPOUND_
BATCH_
WELL
"
COMPOUND_WELL_CONCENTRATION_PROPNAME
=
"
CONCENTRATION_M
"
COMPOUND_WELL_MATERIAL_PROPNAME
=
"
COMPOUND
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment