iron_worker_ng 1.6.4 → 1.6.5

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
  SHA1:
3
- metadata.gz: 4dceb21b4e176225f0a5734c84418c1869057002
4
- data.tar.gz: 0a4661a382515893776e9fe322966dce35348e58
3
+ metadata.gz: c2b00fa9d2ec3be6e169106791773b106146c054
4
+ data.tar.gz: 788a1a3cea550f35b028de1efeead9527a3ceef4
5
5
  SHA512:
6
- metadata.gz: b4f81f7d49ee9780b5309059706c289256de133322b761ff7c0cd2133fb2721881ea57fa15d6575047e803f91dbdf2c71919399da05aedc7b510d0a6d24d7ba8
7
- data.tar.gz: 98cc687d4f7b4e3cc91cbcf73435bdee44cd299081672d47b87c3b8bf75772e67ddb4912fe7fc5d4cbf3838a0e2338ec1d8173c8bd256ca5e879a1b472502ffb
6
+ metadata.gz: 37f4a6a29f7dd0a369d6b3dba01bb108ccc8e8a658f688a9a260cb5f3151707c87963dae8f32a109a5805e2016d906b2ef87326d82969c1e0a8ccf6bd1df4d4b
7
+ data.tar.gz: 9a3225a36201619298d5ec3f78df0450f58dc7e739aceda62fc7818dcd53ae2b9c88f7733f2b4921f99df28b170a1d3a5fc1160ec65e4b02a5ff7c50f8735192
data/README.md CHANGED
@@ -656,8 +656,6 @@ puts schedule.id
656
656
  - **priority**: Setting the priority of your job. Valid values are 0, 1, and 2. The default is 0. Higher values means tasks spend less time in the queue once they come off the schedule.
657
657
  - **start_at**: The time the scheduled task should first be run.
658
658
  - **timeout**: The maximum runtime of your task in seconds. No task can exceed 3600 seconds (60 minutes). The default is 3600 but can be set to a shorter duration.
659
- - **delay**: The number of seconds to delay before scheduling the tasks. Default is 0.
660
- - **task_delay**: The number of seconds to delay before actually queuing the task. Default is 0.
661
659
  - **label**: Optional label for adding custom labels to scheduled tasks.
662
660
  - **cluster**: cluster name ex: "high-mem" or "dedicated". This is a premium feature for customers to have access to more powerful or custom built worker solutions. Dedicated worker clusters exist for users who want to reserve a set number of workers just for their queued tasks. If not set default is set to "default" which is the public IronWorker cluster.
663
661
 
@@ -179,11 +179,6 @@ elsif command == 'queue' || command == 'schedule'
179
179
  options[:timeout] = v
180
180
  end
181
181
 
182
- desc = command == 'queue' ? 'delay before start in seconds' : 'delay before scheduling tasks in seconds'
183
- opts.on('--delay DELAY', Integer, desc) do |v|
184
- options[:delay] = v
185
- end
186
-
187
182
  opts.on('--cluster CLUSTER', String, 'Run task on selected cluster') do |v|
188
183
  options[:cluster] = v
189
184
  end
@@ -194,16 +189,16 @@ elsif command == 'queue' || command == 'schedule'
194
189
  end
195
190
 
196
191
  if command == 'queue'
192
+ opts.on('--delay DELAY', Integer, 'delay before start in seconds') do |v|
193
+ options[:delay] = v
194
+ end
195
+
197
196
  opts.on('--wait', Integer, 'wait for task to complete and print log') do |v|
198
197
  options[:wait] = true
199
198
  end
200
199
  end
201
200
 
202
201
  if command == 'schedule'
203
- opts.on('--task-delay DELAY', Integer, 'delay before start of task in seconds') do |v|
204
- options[:task_delay] = v
205
- end
206
-
207
202
  opts.on('--start-at TIME', 'start task at specified time') do |v|
208
203
  options[:start_at] = Time.parse(v)
209
204
  end
@@ -48,7 +48,9 @@ module IronWorkerNG
48
48
  end
49
49
 
50
50
  def codes_create(name, file, runtime, runner, options)
51
- parse_response(post_file("projects/#{@project_id}/codes", :file, File.new(file, 'rb'), :data, {:name => name, :runtime => runtime, :file_name => runner}.merge(options)))
51
+ file_instance = file.to_s.strip == "" || runner.to_s.strip == "" ? "" : File.new(file, 'rb')
52
+ options = {:name => name, :runtime => runtime, :file_name => runner}.merge(options)
53
+ parse_response(post_file("projects/#{@project_id}/codes", :file, file_instance, :data, options))
52
54
  end
53
55
 
54
56
  def codes_delete(id)
@@ -21,7 +21,7 @@ module IronWorkerNG
21
21
 
22
22
  ::Dir.mkdir(pip_dir_name)
23
23
 
24
- p = 'pip-6.0.8'
24
+ p = 'pip-1.3.1'
25
25
  `cd #{pip_dir_name} && curl -O https://pypi.python.org/packages/source/p/pip/#{p}.tar.gz && tar xf #{p}.tar.gz && cd #{p} && python setup.py install --user --root #{pip_dir_name} && cd .. && rm -rf #{p} #{p}.tar.gz`
26
26
 
27
27
  pip_packages_dir = ::Dir.glob(pip_dir_name + ENV['HOME'] + '/.local/lib/python*').first
@@ -44,7 +44,6 @@ module IronWorkerNG
44
44
  deps_string = @deps.map { |dep| dep.name + dep.version.to_s.sub(/\A\d/, '==\0') }.join(' ')
45
45
  install_command = pip_binary + ' install -U -I --user --root ' + pips_dir_name + ' ' + deps_string
46
46
 
47
- puts install_command
48
47
  fork do
49
48
  ENV['PYTHONPATH'] = pip_packages_dir + '/site-packages:' + pip_packages_dir + '/dist-packages'
50
49
  puts `#{install_command}`
@@ -1,5 +1,5 @@
1
1
  module IronWorkerNG
2
- VERSION = '1.6.4'
2
+ VERSION = '1.6.5'
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_worker_ng
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.4
4
+ version: 1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kirilenko
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-30 00:00:00.000000000 Z
12
+ date: 2015-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: iron_core
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
241
  version: 1.3.6
242
242
  requirements: []
243
243
  rubyforge_project:
244
- rubygems_version: 2.4.2
244
+ rubygems_version: 2.2.2
245
245
  signing_key:
246
246
  specification_version: 4
247
247
  summary: New generation ruby client for IronWorker