myreplicator 1.1.65 → 1.1.66
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/myreplicator/export.rb +13 -16
- data/lib/exporter/sql_commands.rb +1 -1
- data/lib/myreplicator/version.rb +1 -1
- data/test/dummy/log/development.log +153 -0
- metadata +4 -4
@@ -47,24 +47,21 @@ module Myreplicator
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def reload
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
if self.export_type != "all"
|
61
|
-
self.max_incremental_value = nil
|
62
|
-
self.save!
|
63
|
-
end
|
50
|
+
|
51
|
+
# TRUNCATE TABLE & Reset incremental value if there is any
|
52
|
+
sql = "TRUNCATE TABLE #{self.destination_schema}.#{self.table_name};"
|
53
|
+
if self.export_to == "vertica"
|
54
|
+
Myreplicator::DB.exec_sql("vertica",sql)
|
55
|
+
else
|
56
|
+
Myreplicator::DB.exec_sql("#{self.destination_schema}",sql)
|
57
|
+
end
|
64
58
|
|
65
|
-
|
66
|
-
|
59
|
+
if self.export_type != "all"
|
60
|
+
self.max_incremental_value = nil
|
61
|
+
self.save!
|
67
62
|
end
|
63
|
+
|
64
|
+
Resque.enqueue(Myreplicator::Export, id)
|
68
65
|
end
|
69
66
|
##
|
70
67
|
# Runs the export process using the required Exporter library
|
@@ -192,7 +192,7 @@ module Myreplicator
|
|
192
192
|
if options[:incremental_val] == "0"
|
193
193
|
options[:incremental_val] = "1900-01-01 00:00:00"
|
194
194
|
end
|
195
|
-
sql += "WHERE #{options[:incremental_col]} >= '#{(DateTime.parse(options[:incremental_val]) -1.
|
195
|
+
sql += "WHERE #{options[:incremental_col]} >= '#{(DateTime.parse(options[:incremental_val]) -1.hour).to_s(:db)}'" #buffer 1 hour
|
196
196
|
elsif options[:incremental_col_type] == "int"
|
197
197
|
if options[:incremental_val].blank?
|
198
198
|
options[:incremental_val] = "0"
|
data/lib/myreplicator/version.rb
CHANGED
@@ -43448,3 +43448,156 @@ Served asset /myreplicator/select2.js - 304 Not Modified (0ms)
|
|
43448
43448
|
|
43449
43449
|
Started GET "/assets/myreplicator/application.js?body=1" for 127.0.0.1 at 2013-07-29 18:17:58 -0700
|
43450
43450
|
Served asset /myreplicator/application.js - 304 Not Modified (0ms)
|
43451
|
+
Connecting to database specified by database.yml
|
43452
|
+
|
43453
|
+
|
43454
|
+
Started GET "/myreplicator/" for 127.0.0.1 at 2013-08-02 14:52:33 -0700
|
43455
|
+
Processing by Myreplicator::HomeController#index as HTML
|
43456
|
+
[1m[36m (18.4ms)[0m [1mSELECT COUNT(*) FROM `myreplicator_logs` WHERE (state = 'error' AND job_type = 'export')[0m
|
43457
|
+
[1m[35m (1.0ms)[0m SELECT COUNT(*) FROM `myreplicator_logs` WHERE (state = 'error' AND job_type = 'loader')
|
43458
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM `myreplicator_logs` WHERE (state = 'error' AND job_type = 'transporter')[0m
|
43459
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM `myreplicator_logs` WHERE `myreplicator_logs`.`state` = 'running'
|
43460
|
+
Rendered /Users/lnguyen/Documents/myreplicator/app/views/myreplicator/home/_home_menu.erb (117.9ms)
|
43461
|
+
Rendered /Users/lnguyen/Documents/myreplicator/app/views/myreplicator/home/index.html.erb within layouts/myreplicator/application (163.1ms)
|
43462
|
+
Completed 500 Internal Server Error in 206ms
|
43463
|
+
|
43464
|
+
ActionView::Template::Error (uninitialized constant Myreplicator::ApplicationHelper::Settings):
|
43465
|
+
3: err2 = loader_err_count
|
43466
|
+
4: err3 = transporter_err_count
|
43467
|
+
5: run = run_count
|
43468
|
+
6: um = under_maintenance
|
43469
|
+
7: %>
|
43470
|
+
8: <%if um == true%> <div id="maint-message">The site is currently under maintanence</div> <% end %>
|
43471
|
+
9: <div class="home-menu">
|
43472
|
+
/Users/lnguyen/Documents/myreplicator/app/helpers/myreplicator/application_helper.rb:39:in `under_maintenance'
|
43473
|
+
/Users/lnguyen/Documents/myreplicator/app/views/myreplicator/home/_home_menu.erb:6:in `___sers_lnguyen__ocuments_myreplicator_app_views_myreplicator_home__home_menu_erb__300557121650243990_70185195555340'
|
43474
|
+
actionpack (3.2.8) lib/action_view/template.rb:145:in `block in render'
|
43475
|
+
activesupport (3.2.8) lib/active_support/notifications.rb:125:in `instrument'
|
43476
|
+
actionpack (3.2.8) lib/action_view/template.rb:143:in `render'
|
43477
|
+
actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
|
43478
|
+
actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
|
43479
|
+
actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
|
43480
|
+
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `block in instrument'
|
43481
|
+
activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
|
43482
|
+
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
|
43483
|
+
actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
|
43484
|
+
actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:237:in `render'
|
43485
|
+
actionpack (3.2.8) lib/action_view/renderer/renderer.rb:41:in `render_partial'
|
43486
|
+
actionpack (3.2.8) lib/action_view/renderer/renderer.rb:15:in `render'
|
43487
|
+
actionpack (3.2.8) lib/action_view/helpers/rendering_helper.rb:24:in `render'
|
43488
|
+
/Users/lnguyen/Documents/myreplicator/app/views/myreplicator/home/index.html.erb:1:in `___sers_lnguyen__ocuments_myreplicator_app_views_myreplicator_home_index_html_erb___717656071163079312_70185168993600'
|
43489
|
+
actionpack (3.2.8) lib/action_view/template.rb:145:in `block in render'
|
43490
|
+
activesupport (3.2.8) lib/active_support/notifications.rb:125:in `instrument'
|
43491
|
+
actionpack (3.2.8) lib/action_view/template.rb:143:in `render'
|
43492
|
+
actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
|
43493
|
+
actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
|
43494
|
+
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `block in instrument'
|
43495
|
+
activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
|
43496
|
+
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
|
43497
|
+
actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
|
43498
|
+
actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
|
43499
|
+
actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
|
43500
|
+
actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:45:in `render_template'
|
43501
|
+
actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:18:in `render'
|
43502
|
+
actionpack (3.2.8) lib/action_view/renderer/renderer.rb:36:in `render_template'
|
43503
|
+
actionpack (3.2.8) lib/action_view/renderer/renderer.rb:17:in `render'
|
43504
|
+
actionpack (3.2.8) lib/abstract_controller/rendering.rb:110:in `_render_template'
|
43505
|
+
actionpack (3.2.8) lib/action_controller/metal/streaming.rb:225:in `_render_template'
|
43506
|
+
actionpack (3.2.8) lib/abstract_controller/rendering.rb:103:in `render_to_body'
|
43507
|
+
actionpack (3.2.8) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
|
43508
|
+
actionpack (3.2.8) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
|
43509
|
+
actionpack (3.2.8) lib/abstract_controller/rendering.rb:88:in `render'
|
43510
|
+
actionpack (3.2.8) lib/action_controller/metal/rendering.rb:16:in `render'
|
43511
|
+
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
|
43512
|
+
activesupport (3.2.8) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
|
43513
|
+
/Users/lnguyen/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
|
43514
|
+
activesupport (3.2.8) lib/active_support/core_ext/benchmark.rb:5:in `ms'
|
43515
|
+
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
|
43516
|
+
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
|
43517
|
+
activerecord (3.2.8) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
|
43518
|
+
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:39:in `render'
|
43519
|
+
actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
|
43520
|
+
actionpack (3.2.8) lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
|
43521
|
+
/Users/lnguyen/Documents/myreplicator/app/controllers/myreplicator/home_controller.rb:12:in `index'
|
43522
|
+
actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
|
43523
|
+
actionpack (3.2.8) lib/abstract_controller/base.rb:167:in `process_action'
|
43524
|
+
actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:in `process_action'
|
43525
|
+
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
|
43526
|
+
activesupport (3.2.8) lib/active_support/callbacks.rb:414:in `_run__1684113417216949297__process_action__2279210519131529461__callbacks'
|
43527
|
+
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback'
|
43528
|
+
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
|
43529
|
+
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks'
|
43530
|
+
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:17:in `process_action'
|
43531
|
+
actionpack (3.2.8) lib/action_controller/metal/rescue.rb:29:in `process_action'
|
43532
|
+
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
|
43533
|
+
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `block in instrument'
|
43534
|
+
activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
|
43535
|
+
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
|
43536
|
+
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
|
43537
|
+
actionpack (3.2.8) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
|
43538
|
+
activerecord (3.2.8) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
|
43539
|
+
actionpack (3.2.8) lib/abstract_controller/base.rb:121:in `process'
|
43540
|
+
actionpack (3.2.8) lib/abstract_controller/rendering.rb:45:in `process'
|
43541
|
+
actionpack (3.2.8) lib/action_controller/metal.rb:203:in `dispatch'
|
43542
|
+
actionpack (3.2.8) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
|
43543
|
+
actionpack (3.2.8) lib/action_controller/metal.rb:246:in `block in action'
|
43544
|
+
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `call'
|
43545
|
+
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
|
43546
|
+
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:36:in `call'
|
43547
|
+
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
|
43548
|
+
journey (1.0.4) lib/journey/router.rb:56:in `each'
|
43549
|
+
journey (1.0.4) lib/journey/router.rb:56:in `call'
|
43550
|
+
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:in `call'
|
43551
|
+
railties (3.2.8) lib/rails/engine.rb:479:in `call'
|
43552
|
+
railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `method_missing'
|
43553
|
+
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
|
43554
|
+
journey (1.0.4) lib/journey/router.rb:56:in `each'
|
43555
|
+
journey (1.0.4) lib/journey/router.rb:56:in `call'
|
43556
|
+
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:in `call'
|
43557
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
|
43558
|
+
rack (1.4.1) lib/rack/etag.rb:23:in `call'
|
43559
|
+
rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
|
43560
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/head.rb:14:in `call'
|
43561
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
|
43562
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/flash.rb:242:in `call'
|
43563
|
+
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
|
43564
|
+
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
|
43565
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/cookies.rb:339:in `call'
|
43566
|
+
activerecord (3.2.8) lib/active_record/query_cache.rb:64:in `call'
|
43567
|
+
activerecord (3.2.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
|
43568
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
|
43569
|
+
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `_run__762155663378628292__call__972831094718723707__callbacks'
|
43570
|
+
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback'
|
43571
|
+
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
|
43572
|
+
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks'
|
43573
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
|
43574
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/reloader.rb:65:in `call'
|
43575
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
|
43576
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
|
43577
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
|
43578
|
+
railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
|
43579
|
+
railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
|
43580
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
|
43581
|
+
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
|
43582
|
+
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
|
43583
|
+
activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
|
43584
|
+
rack (1.4.1) lib/rack/lock.rb:15:in `call'
|
43585
|
+
actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
|
43586
|
+
railties (3.2.8) lib/rails/engine.rb:479:in `call'
|
43587
|
+
railties (3.2.8) lib/rails/application.rb:223:in `call'
|
43588
|
+
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
|
43589
|
+
railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
|
43590
|
+
rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
|
43591
|
+
/Users/lnguyen/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
|
43592
|
+
/Users/lnguyen/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
|
43593
|
+
/Users/lnguyen/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
|
43594
|
+
|
43595
|
+
|
43596
|
+
Rendered /Users/lnguyen/.rvm/gems/ruby-1.9.3-p374/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.7ms)
|
43597
|
+
Rendered /Users/lnguyen/.rvm/gems/ruby-1.9.3-p374/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.7ms)
|
43598
|
+
Rendered /Users/lnguyen/.rvm/gems/ruby-1.9.3-p374/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (12.3ms)
|
43599
|
+
Connecting to database specified by database.yml
|
43600
|
+
Connecting to database specified by database.yml
|
43601
|
+
Connecting to database specified by database.yml
|
43602
|
+
Connecting to database specified by database.yml
|
43603
|
+
Connecting to database specified by database.yml
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myreplicator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.66
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -358,7 +358,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
358
358
|
version: '0'
|
359
359
|
segments:
|
360
360
|
- 0
|
361
|
-
hash:
|
361
|
+
hash: 1455081320881497800
|
362
362
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
363
363
|
none: false
|
364
364
|
requirements:
|
@@ -367,7 +367,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
367
367
|
version: '0'
|
368
368
|
segments:
|
369
369
|
- 0
|
370
|
-
hash:
|
370
|
+
hash: 1455081320881497800
|
371
371
|
requirements: []
|
372
372
|
rubyforge_project:
|
373
373
|
rubygems_version: 1.8.24
|