Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ebulk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ebulk
Commits
9ee153ad
Commit
9ee153ad
authored
Jul 12, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solving http request issue due to frontend ciphers
- see
nexedi/ebulk#1
parent
15ea30c8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
53 deletions
+52
-53
ebulk
ebulk
+2
-2
ebulk-data/embulk-wendelin-dataset-tool/lib/embulk/wendelin_client.rb
...mbulk-wendelin-dataset-tool/lib/embulk/wendelin_client.rb
+50
-51
No files found.
ebulk
View file @
9ee153ad
#! /usr/bin/env bash
DOWN_URL
=
'https://softinst104003.host.vifib.net/erp5/'
ING_URL
=
'https://softinst104003.host.vifib.net/erp5/portal_ingestion_policies/wendelin_embulk'
DOWN_URL
=
'https://softinst104003.
l
host.vifib.net/erp5/'
ING_URL
=
'https://softinst104003.
l
host.vifib.net/erp5/portal_ingestion_policies/wendelin_embulk'
EBULK_VERSION
=
"0.9.7"
EBULK_DATA_PATH
=
~/.ebulk
...
...
ebulk-data/embulk-wendelin-dataset-tool/lib/embulk/wendelin_client.rb
View file @
9ee153ad
...
...
@@ -36,7 +36,7 @@ class WendelinClient
checkReferenceChars
(
reference
)
uri
=
URI
(
URI
.
escape
(
"
#{
@erp5_url
}
/ingestionReferenceExists?reference=
#{
reference
}
"
))
begin
res
=
open
(
uri
,
http_basic_authentication:
[
@user
,
@password
]).
read
res
ponse
=
handleRequest
(
uri
)
rescue
Exception
=>
e
@logger
.
error
(
"An error occurred while checking if reference exists: "
+
e
.
to_s
)
@logger
.
error
(
e
.
backtrace
)
...
...
@@ -45,7 +45,7 @@ class WendelinClient
end
return
FALSE
else
return
res
.
to_s
==
'TRUE'
return
res
ponse
.
to_s
==
'TRUE'
end
end
...
...
@@ -79,7 +79,7 @@ class WendelinClient
@logger
.
info
(
"Increasing dataset version"
)
begin
uri
=
URI
(
URI
.
escape
(
"
#{
@erp5_url
}
/ERP5Site_increaseDatasetVersion?reference=
#{
reference
}
"
))
res
=
open
(
uri
,
http_basic_authentication:
[
@user
,
@password
]).
read
response
=
handleRequest
(
uri
)
rescue
Exception
=>
e
@logger
.
error
(
"An error occurred while increasing dataset version: "
+
e
.
to_s
)
@logger
.
error
(
e
.
backtrace
)
...
...
@@ -151,7 +151,7 @@ class WendelinClient
n_retry
=
0
while
!
success
&&
n_retry
<
10
begin
res
=
open
(
uri
,
http_basic_authentication:
[
@user
,
@password
])
{
res
=
open
(
uri
,
http_basic_authentication:
[
@user
,
@password
]
,
ssl_verify_mode:
OpenSSL
::
SSL
::
VERIFY_NONE
)
{
|
content
|
chunk
=
content
.
read
()
if
chunk
.
nil?
||
chunk
.
empty?
...
...
@@ -198,7 +198,6 @@ class WendelinClient
def
handleRequest
(
uri
,
reference
=
nil
,
data_chunk
=
nil
)
req
=
Net
::
HTTP
::
Post
.
new
(
uri
)
req
.
basic_auth
@user
,
@password
if
data_chunk
!=
nil
@logger
.
info
(
"Setting request form data..."
,
print
=
TRUE
)
if
reference
!=
nil
begin
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment