Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
j.hoerdt
sensor2graph
Commits
b7c8acd8
Commit
b7c8acd8
authored
Dec 20, 2021
by
neop
Browse files
don't softcode http_agent
parent
fbf3c724
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/sensor2graph/Main.java
View file @
b7c8acd8
...
...
@@ -32,7 +32,6 @@ public class Main {
public
static
File
geocoding_cache
;
public
static
int
concurrency
;
public
static
int
process_timeout_minutes
;
private
static
String
http_agent
;
private
static
String
neo4j_uri
;
private
static
String
influxdb_uri
;
private
static
String
influxdb_database_name
;
...
...
@@ -187,9 +186,11 @@ public class Main {
System
.
exit
(-
1
);
}
Main
.
logger
.
fine
(
"setting http_agent to: "
+
http_agent
);
System
.
setProperty
(
"http.agent"
,
http_agent
);
{
var
http_agent
=
"Please/0.5"
;
Main
.
logger
.
fine
(
"setting http agent to: "
+
http_agent
);
System
.
setProperty
(
"http.agent"
,
http_agent
);
}
Main
.
logger
.
fine
(
"initializing neo4j driver."
);
initialize_neo4j_driver
();
...
...
@@ -226,7 +227,6 @@ public class Main {
csv_directory
=
new
File
(
config
.
getProperty
(
"csv_directory"
));
geocoding_cache
=
new
File
(
config
.
getProperty
(
"geocoding_cache"
));
concurrency
=
Integer
.
parseInt
(
config
.
getProperty
(
"concurrency"
));
http_agent
=
config
.
getProperty
(
"http_agent"
);
neo4j_uri
=
config
.
getProperty
(
"neo4j_uri"
);
archive_uri
=
config
.
getProperty
(
"archive_uri"
);
sensor_type_info
=
config
.
getProperty
(
"sensor_type_info"
);
...
...
@@ -255,7 +255,6 @@ public class Main {
defaults
.
setProperty
(
"csv_directory"
,
"data/csv_files/"
);
defaults
.
setProperty
(
"geocoding_cache"
,
"data/geocoding_cache/"
);
defaults
.
setProperty
(
"concurrency"
,
"10"
);
defaults
.
setProperty
(
"http_agent"
,
"Please/0.5"
);
defaults
.
setProperty
(
"neo4j_uri"
,
"bolt://localhost:7687"
);
defaults
.
setProperty
(
"archive_uri"
,
"https://archive.sensor.community/"
);
defaults
.
setProperty
(
"sensor_type_info"
,
"sensor_type_info.json"
);
...
...
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