mass-client 1.0.24 → 1.0.26

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: 960021fea3e8dc9a0735b20a24730083231b8109ec74dd738a3d8508ff5ced3a
4
- data.tar.gz: 126df561fa20424d26c71d3b6b32000b7ae1ae72b6beda64bc37e9bfef56894b
3
+ metadata.gz: 6caaeba4da0bc4a9f86bfea21d99d1606b24760002ecad4a350b00f6f632abac
4
+ data.tar.gz: 96d5d626cd5812a85c8d228f86d5aa4a9c49f655f8969de6cce71b52e5ef8eac
5
5
  SHA512:
6
- metadata.gz: 92bb76f6c2cd71c2b9d5cbcc84fce102c7c5ab2de8949e6dedf5a09d8f928e221563133049ff212d4d601ea317b714a77e0767016d9e671c3df365b6120fc06f
7
- data.tar.gz: 402f6999e082f2bc4e90168915a165c2f336bd3547bbd360e909d07ddc879af3add9c3d1363a39198d7a5d4e443505d7adc1936840b93a58d2b6131d8144e149
6
+ metadata.gz: 21f9d3e0407e37d6f2d97517c59bf1511e6870f13377dedb97b7c3814e068c0d8fcd8d4c992949b12116a56caf08a90499a2c4d5d95ed773ebe9bc7ad2dc2623
7
+ data.tar.gz: '094e068d1434dfc38cd23830d22afb78b728ffe2ce670bb738fcff4c757a95eb51e9f8139472d7ee38dc2a30cbae440d785a8b0253c1cfd0046866b11af8e1b6'
@@ -4,7 +4,7 @@ module Mass
4
4
 
5
5
  # DROPBOX LOCKFILE PARAMETERS
6
6
  LOCKFILE_PATH = '/tmp/dropbox_upload.lock' # Path to your lockfile
7
- LOCK_TIMEOUT = 5 # Maximum time in seconds to wait for the lock
7
+ LOCK_TIMEOUT = 30 # Maximum time in seconds to wait for the lock
8
8
 
9
9
  # DROPBOX LOCKFILE FUNCTIONS
10
10
  def acquire_lock
@@ -27,6 +27,7 @@ module Mass
27
27
  end
28
28
 
29
29
  def upload_to_dropbox_with_lock(tmp_path, path)
30
+ s = ''
30
31
  acquire_lock
31
32
  begin
32
33
  # Upload the file to Dropbox
@@ -36,7 +37,7 @@ module Mass
36
37
  raise "Dropbox file upload failed. Dropbox response: #{s}"
37
38
  end
38
39
  rescue => e
39
- raise "Error during upload: #{e.message}"
40
+ raise "Error during upload: #{e.message} - Dropbox response: #{s}"
40
41
  ensure
41
42
  # Always release the lock, even if an error occurs
42
43
  release_lock
@@ -2,7 +2,7 @@ module Mass
2
2
  class ProfileRPA < Mass::Profile
3
3
 
4
4
  @@buffer_driver = nil
5
- attr_accessor :headless
5
+ attr_accessor :headless, :read_timeout
6
6
 
7
7
  # SELENIUM FUNCTIONS
8
8
  def self.buffer_driver
@@ -16,6 +16,7 @@ module Mass
16
16
  def initialize(desc)
17
17
  super(desc)
18
18
  headless = true
19
+ read_timeout = 300 # 300 seconds - 5 minutes
19
20
  end
20
21
 
21
22
  def self.domain
@@ -304,7 +305,10 @@ module Mass
304
305
  sleep(1)
305
306
 
306
307
  if self.class.buffer_driver.nil?
307
- self.class.buffer_driver = c.driver(self.desc['ads_power_id'], headless)
308
+ self.class.buffer_driver = c.driver2( self.desc['ads_power_id'],
309
+ headless: headless,
310
+ read_timeout: read_timeout
311
+ )
308
312
  self.class.buffer_driver.manage.window.resize_to(self.desc['browser_width'], self.desc['browser_height'])
309
313
  self.one_tab
310
314
 
data/lib/mass-client.rb CHANGED
@@ -7,6 +7,7 @@ require 'simple_command_line_parser'
7
7
  require 'colorize'
8
8
  require 'timeout'
9
9
  require 'base64'
10
+ require 'adspower-client'
10
11
 
11
12
  # mass client configuration
12
13
  module Mass
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mass-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.24
4
+ version: 1.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-25 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: timeout
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 1.1.2
139
+ - !ruby/object:Gem::Dependency
140
+ name: adspower-client
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 1.0.14
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 1.0.14
139
153
  description: Ruby library for MassProspecting API.
140
154
  email: leandro@massprospecting.com
141
155
  executables: []