easy_ml 0.2.0.pre.rc19 → 0.2.0.pre.rc21
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0de4170b55d8d6e28cc09ac68421cbee2f0c441e6fb89e86207620fef642ee3
|
4
|
+
data.tar.gz: 86e5b583cc202827bc3d2d9ea89fd4dd13f1d95f729ad5ae8d43936a66fe1a2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d066503c36f9daee59ad93a89b6f35ff6c211602181030036edc31b7ece52276fd252a7a85b549263a180f4ec85f86a04e498440f217b6431d8da0225d9de0e
|
7
|
+
data.tar.gz: c9c69540e6fbbedd688517226cffc757938933317952f9318189200a259dbc5b0963de6dfaa330741ea50387d290980176837f78ea80de04ea5e76b8d8f1c794
|
@@ -72,9 +72,9 @@ module EasyML
|
|
72
72
|
# Start sync in background to avoid blocking
|
73
73
|
datasource.refresh_async
|
74
74
|
|
75
|
-
redirect_to easy_ml_datasources_path, notice: "Datasource is syncing..."
|
75
|
+
redirect_to easy_ml_datasources_path(host: request.host), notice: "Datasource is syncing..."
|
76
76
|
rescue ActiveRecord::RecordNotFound
|
77
|
-
redirect_to easy_ml_datasources_path, error: "Datasource not found..."
|
77
|
+
redirect_to easy_ml_datasources_path(host: request.host), error: "Datasource not found..."
|
78
78
|
end
|
79
79
|
|
80
80
|
private
|
@@ -3,7 +3,9 @@ require_relative "polars_reader"
|
|
3
3
|
module EasyML
|
4
4
|
module Data
|
5
5
|
class SyncedDirectory
|
6
|
-
attr_accessor :root_dir, :s3_bucket, :s3_prefix,
|
6
|
+
attr_accessor :root_dir, :s3_bucket, :s3_prefix,
|
7
|
+
:s3_access_key_id, :s3_secret_access_key,
|
8
|
+
:s3_region, :cache_for, :polars_args
|
7
9
|
|
8
10
|
def initialize(options = {})
|
9
11
|
@root_dir = options.dig(:root_dir)
|
@@ -11,6 +13,7 @@ module EasyML
|
|
11
13
|
@s3_prefix = options.dig(:s3_prefix)
|
12
14
|
@s3_access_key_id = options.dig(:s3_access_key_id)
|
13
15
|
@s3_secret_access_key = options.dig(:s3_secret_access_key)
|
16
|
+
@s3_region = options.dig(:s3_region) || EasyML::Configuration.s3_region
|
14
17
|
@cache_for = options.dig(:cache_for)
|
15
18
|
@polars_args = options.dig(:polars_args)
|
16
19
|
end
|
@@ -224,6 +227,7 @@ module EasyML
|
|
224
227
|
http_read_timeout: 30, # Timeout for reading response (in seconds))
|
225
228
|
http_wire_trace: false, # Enable verbose HTTP logging
|
226
229
|
http_idle_timeout: 0,
|
230
|
+
region: s3_region,
|
227
231
|
logger: Logger.new(STDOUT), # Logs to STDOUT; you can also set a file
|
228
232
|
)
|
229
233
|
end
|
@@ -95,7 +95,7 @@ module EasyML
|
|
95
95
|
def s3
|
96
96
|
@s3 ||= begin
|
97
97
|
credentials = Aws::Credentials.new(s3_access_key_id, s3_secret_access_key)
|
98
|
-
Aws::S3::Client.new(credentials: credentials)
|
98
|
+
Aws::S3::Client.new(credentials: credentials, region: s3_region)
|
99
99
|
end
|
100
100
|
end
|
101
101
|
end
|
data/lib/easy_ml/version.rb
CHANGED