kura 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +6 -0
- data/lib/kura/client.rb +18 -4
- data/lib/kura/extensions/google/apis/bigquery_v2/job.rb +4 -0
- data/lib/kura/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82e2481d7711b622ffa903f7f84d177bc4ef04f0
|
4
|
+
data.tar.gz: e8477315ada88d49725defb1693dcca1e96f8dca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2df39ba623737489a4ec5b56d1619b8130d7d31d59240870c32f8d79a51655df3642ef53c1c1524c0394566aae78ec9250e647a438655c615d1368c046582282
|
7
|
+
data.tar.gz: 2a31ad9a0afc7b87259d673c48de48b35c543c2ff1ed514c6ecce603497fb274037653ccc6903048b7657ae584151076c1570b17c05beae55fb485b53962c409
|
data/ChangeLog.md
CHANGED
data/lib/kura/client.rb
CHANGED
@@ -507,13 +507,20 @@ module Kura
|
|
507
507
|
insert_job(configuration, wait: wait, job_id: job_id, project_id: job_project_id, &blk)
|
508
508
|
end
|
509
509
|
|
510
|
-
def job(job_id, project_id: @default_project_id)
|
511
|
-
|
510
|
+
def job(job_id, project_id: @default_project_id, &blk)
|
511
|
+
if blk
|
512
|
+
@api.get_job(project_id, job_id) do |j, e|
|
513
|
+
j.kura_api = self
|
514
|
+
blk.call(j, e)
|
515
|
+
end
|
516
|
+
else
|
517
|
+
@api.get_job(project_id, job_id).tap{|j| j.kura_api = self}
|
518
|
+
end
|
512
519
|
rescue
|
513
520
|
process_error($!)
|
514
521
|
end
|
515
522
|
|
516
|
-
def cancel_job(job, project_id: @default_project_id)
|
523
|
+
def cancel_job(job, project_id: @default_project_id, &blk)
|
517
524
|
case job
|
518
525
|
when String
|
519
526
|
jobid = job
|
@@ -523,7 +530,14 @@ module Kura
|
|
523
530
|
else
|
524
531
|
raise TypeError, "Kura::Client#cancel_job accept String(job-id) or Google::Apis::BigqueryV2::Job"
|
525
532
|
end
|
526
|
-
|
533
|
+
if blk
|
534
|
+
@api.cancel_job(project_id, jobid) do |r, e|
|
535
|
+
r.job.kura_api = self
|
536
|
+
blk.call(r.job, e)
|
537
|
+
end
|
538
|
+
else
|
539
|
+
@api.cancel_job(project_id, jobid).job.tap{|j| j.kura_api = self}
|
540
|
+
end
|
527
541
|
end
|
528
542
|
|
529
543
|
def job_finished?(r)
|
data/lib/kura/version.rb
CHANGED