brendan-skynet 0.9.33 → 0.9.303

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. data/History.txt +9 -0
  2. data/License.txt +1 -0
  3. data/Manifest.txt +19 -112
  4. data/Rakefile +3 -3
  5. data/app_generators/skynet_install/templates/skynet_config.rb +1 -1
  6. data/extras/rails/views/skynet/index.html.erb +137 -0
  7. data/lib/skynet.rb +15 -15
  8. data/lib/skynet/{skynet_active_record_extensions.rb → active_record_extensions.rb} +0 -0
  9. data/lib/skynet/{skynet_config.rb → config.rb} +0 -0
  10. data/lib/skynet/{skynet_console.rb → console.rb} +1 -1
  11. data/lib/skynet/{skynet_console_helper.rb → console_helper.rb} +0 -0
  12. data/lib/skynet/{skynet_debugger.rb → debugger.rb} +0 -0
  13. data/lib/skynet/{skynet_guid_generator.rb → guid_generator.rb} +0 -0
  14. data/lib/skynet/{skynet_job.rb → job.rb} +0 -0
  15. data/lib/skynet/{skynet_launcher.rb → launcher.rb} +0 -0
  16. data/lib/skynet/{skynet_logger.rb → logger.rb} +0 -0
  17. data/lib/skynet/{skynet_manager.rb → manager.rb} +0 -0
  18. data/lib/skynet/{skynet_message.rb → message.rb} +0 -0
  19. data/lib/skynet/{skynet_message_queue.rb → message_queue.rb} +0 -0
  20. data/lib/skynet/{skynet_partitioners.rb → partitioners.rb} +0 -0
  21. data/lib/skynet/{skynet_ruby_extensions.rb → ruby_extensions.rb} +0 -0
  22. data/lib/skynet/{skynet_task.rb → task.rb} +0 -0
  23. data/lib/skynet/{skynet_tuplespace_server.rb → tuplespace_server.rb} +0 -0
  24. data/lib/skynet/version.rb +1 -1
  25. data/lib/skynet/{skynet_worker.rb → worker.rb} +0 -0
  26. data/skynet.gemspec +21 -132
  27. metadata +22 -130
  28. data/examples/dgrep/README +0 -70
  29. data/examples/dgrep/config/skynet_config.rb +0 -26
  30. data/examples/dgrep/data/shakespeare/README +0 -2
  31. data/examples/dgrep/data/shakespeare/poetry/loverscomplaint +0 -381
  32. data/examples/dgrep/data/shakespeare/poetry/rapeoflucrece +0 -2199
  33. data/examples/dgrep/data/shakespeare/poetry/sonnets +0 -2633
  34. data/examples/dgrep/data/shakespeare/poetry/various +0 -640
  35. data/examples/dgrep/data/shakespeare/poetry/venusandadonis +0 -1423
  36. data/examples/dgrep/data/testfile1.txt +0 -1
  37. data/examples/dgrep/data/testfile2.txt +0 -1
  38. data/examples/dgrep/data/testfile3.txt +0 -1
  39. data/examples/dgrep/data/testfile4.txt +0 -1
  40. data/examples/dgrep/lib/dgrep.rb +0 -59
  41. data/examples/dgrep/lib/mapreduce_test.rb +0 -32
  42. data/examples/dgrep/lib/most_common_words.rb +0 -45
  43. data/examples/dgrep/script/dgrep +0 -75
  44. data/examples/rails_mysql_example/README +0 -66
  45. data/examples/rails_mysql_example/Rakefile +0 -10
  46. data/examples/rails_mysql_example/app/controllers/application.rb +0 -10
  47. data/examples/rails_mysql_example/app/helpers/application_helper.rb +0 -3
  48. data/examples/rails_mysql_example/app/models/user.rb +0 -21
  49. data/examples/rails_mysql_example/app/models/user_favorite.rb +0 -5
  50. data/examples/rails_mysql_example/app/models/user_mailer.rb +0 -12
  51. data/examples/rails_mysql_example/app/views/user_mailer/welcome.erb +0 -5
  52. data/examples/rails_mysql_example/config/boot.rb +0 -109
  53. data/examples/rails_mysql_example/config/database.yml +0 -42
  54. data/examples/rails_mysql_example/config/environment.rb +0 -59
  55. data/examples/rails_mysql_example/config/environments/development.rb +0 -18
  56. data/examples/rails_mysql_example/config/environments/production.rb +0 -19
  57. data/examples/rails_mysql_example/config/environments/test.rb +0 -22
  58. data/examples/rails_mysql_example/config/initializers/inflections.rb +0 -10
  59. data/examples/rails_mysql_example/config/initializers/mime_types.rb +0 -5
  60. data/examples/rails_mysql_example/config/initializers/skynet.rb +0 -1
  61. data/examples/rails_mysql_example/config/routes.rb +0 -35
  62. data/examples/rails_mysql_example/config/skynet_config.rb +0 -36
  63. data/examples/rails_mysql_example/db/migrate/001_create_skynet_tables.rb +0 -43
  64. data/examples/rails_mysql_example/db/migrate/002_create_users.rb +0 -16
  65. data/examples/rails_mysql_example/db/migrate/003_create_user_favorites.rb +0 -14
  66. data/examples/rails_mysql_example/db/schema.rb +0 -85
  67. data/examples/rails_mysql_example/db/skynet_mysql_schema.sql +0 -33
  68. data/examples/rails_mysql_example/doc/README_FOR_APP +0 -2
  69. data/examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake +0 -20
  70. data/examples/rails_mysql_example/public/404.html +0 -30
  71. data/examples/rails_mysql_example/public/422.html +0 -30
  72. data/examples/rails_mysql_example/public/500.html +0 -30
  73. data/examples/rails_mysql_example/public/dispatch.cgi +0 -10
  74. data/examples/rails_mysql_example/public/dispatch.fcgi +0 -24
  75. data/examples/rails_mysql_example/public/dispatch.rb +0 -10
  76. data/examples/rails_mysql_example/public/favicon.ico +0 -0
  77. data/examples/rails_mysql_example/public/images/rails.png +0 -0
  78. data/examples/rails_mysql_example/public/index.html +0 -277
  79. data/examples/rails_mysql_example/public/javascripts/application.js +0 -2
  80. data/examples/rails_mysql_example/public/javascripts/controls.js +0 -963
  81. data/examples/rails_mysql_example/public/javascripts/dragdrop.js +0 -972
  82. data/examples/rails_mysql_example/public/javascripts/effects.js +0 -1120
  83. data/examples/rails_mysql_example/public/javascripts/prototype.js +0 -4225
  84. data/examples/rails_mysql_example/public/robots.txt +0 -5
  85. data/examples/rails_mysql_example/script/about +0 -3
  86. data/examples/rails_mysql_example/script/console +0 -3
  87. data/examples/rails_mysql_example/script/destroy +0 -3
  88. data/examples/rails_mysql_example/script/generate +0 -3
  89. data/examples/rails_mysql_example/script/performance/benchmarker +0 -3
  90. data/examples/rails_mysql_example/script/performance/profiler +0 -3
  91. data/examples/rails_mysql_example/script/performance/request +0 -3
  92. data/examples/rails_mysql_example/script/plugin +0 -3
  93. data/examples/rails_mysql_example/script/process/inspector +0 -3
  94. data/examples/rails_mysql_example/script/process/reaper +0 -3
  95. data/examples/rails_mysql_example/script/process/spawner +0 -3
  96. data/examples/rails_mysql_example/script/runner +0 -3
  97. data/examples/rails_mysql_example/script/server +0 -3
  98. data/examples/rails_mysql_example/test/fixtures/user_favorites.yml +0 -9
  99. data/examples/rails_mysql_example/test/fixtures/users.yml +0 -11
  100. data/examples/rails_mysql_example/test/test_helper.rb +0 -38
  101. data/examples/rails_mysql_example/test/unit/user_favorite_test.rb +0 -8
  102. data/examples/rails_mysql_example/test/unit/user_test.rb +0 -8
  103. data/extras/nagios/check_skynet.sh +0 -121
  104. data/extras/rails/views/skynet/index.rhtml +0 -137
  105. data/tasks/website.rake +0 -17
  106. data/test/test_active_record_extensions.rb +0 -138
  107. data/test/test_generator_helper.rb +0 -20
  108. data/test/test_helper.rb +0 -10
  109. data/test/test_mysql_message_queue_adapter.rb +0 -263
  110. data/test/test_skynet.rb +0 -19
  111. data/test/test_skynet_install_generator.rb +0 -49
  112. data/test/test_skynet_job.rb +0 -717
  113. data/test/test_skynet_manager.rb +0 -157
  114. data/test/test_skynet_message.rb +0 -229
  115. data/test/test_skynet_task.rb +0 -24
  116. data/test/test_tuplespace_message_queue.rb +0 -174
  117. data/website/index.html +0 -181
  118. data/website/index.txt +0 -98
  119. data/website/javascripts/rounded_corners_lite.inc.js +0 -285
  120. data/website/stylesheets/screen.css +0 -138
  121. data/website/template.rhtml +0 -48
@@ -1,42 +0,0 @@
1
- # MySQL. Versions 4.1 and 5.0 are recommended.
2
- #
3
- # Install the MySQL driver:
4
- # gem install mysql
5
- # On Mac OS X:
6
- # sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
7
- # On Mac OS X Leopard:
8
- # sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
9
- # This sets the ARCHFLAGS environment variable to your native architecture
10
- # On Windows:
11
- # gem install mysql
12
- # Choose the win32 build.
13
- # Install MySQL and put its /bin directory on your path.
14
- #
15
- # And be sure to use new-style password hashing:
16
- # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
17
- development:
18
- adapter: mysql
19
- encoding: utf8
20
- database: rails_mysql_example_development
21
- username: root
22
- password:
23
- socket: /opt/local/var/run/mysql5/mysqld.sock
24
-
25
- # Warning: The database defined as 'test' will be erased and
26
- # re-generated from your development database when you run 'rake'.
27
- # Do not set this db to the same as development or production.
28
- test:
29
- adapter: mysql
30
- encoding: utf8
31
- database: rails_mysql_example_test
32
- username: root
33
- password:
34
- socket: /opt/local/var/run/mysql5/mysqld.sock
35
-
36
- production:
37
- adapter: mysql
38
- encoding: utf8
39
- database: rails_mysql_example_production
40
- username: root
41
- password:
42
- socket: /opt/local/var/run/mysql5/mysqld.sock
@@ -1,59 +0,0 @@
1
- # Be sure to restart your server when you modify this file
2
-
3
- # Uncomment below to force Rails into production mode when
4
- # you don't control web/app server and can't set it the proper way
5
- # ENV['RAILS_ENV'] ||= 'production'
6
-
7
- # Specifies gem version of Rails to use when vendor/rails is not present
8
- RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
9
-
10
- # Bootstrap the Rails environment, frameworks, and default configuration
11
- require File.join(File.dirname(__FILE__), 'boot')
12
-
13
- Rails::Initializer.run do |config|
14
- # Settings in config/environments/* take precedence over those specified here.
15
- # Application configuration should go into files in config/initializers
16
- # -- all .rb files in that directory are automatically loaded.
17
- # See Rails::Configuration for more options.
18
-
19
- # Skip frameworks you're not going to use (only works if using vendor/rails).
20
- # To use Rails without a database, you must remove the Active Record framework
21
- # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
22
-
23
- # Only load the plugins named here, in the order given. By default, all plugins
24
- # in vendor/plugins are loaded in alphabetical order.
25
- # :all can be used as a placeholder for all plugins not explicitly named
26
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
27
-
28
- # Add additional load paths for your own custom dirs
29
- # config.load_paths += %W( #{RAILS_ROOT}/extras )
30
-
31
- # Force all environments to use the same logger level
32
- # (by default production uses :info, the others :debug)
33
- # config.log_level = :debug
34
-
35
- # Your secret key for verifying cookie session data integrity.
36
- # If you change this key, all old sessions will become invalid!
37
- # Make sure the secret is at least 30 characters and all random,
38
- # no regular words or you'll be exposed to dictionary attacks.
39
- config.action_controller.session = {
40
- :session_key => '_rails_mysql_example_session',
41
- :secret => 'd4db9c4042902a6ffea104d1400f85a72ecac047ed1ec7e509b3670f1d77dd00318e9cc6a03d010e70b11e32c6195714e34ec1324d5856fda6b92a02104eca93'
42
- }
43
-
44
- # Use the database for sessions instead of the cookie-based default,
45
- # which shouldn't be used to store highly confidential information
46
- # (create the session table with 'rake db:sessions:create')
47
- # config.action_controller.session_store = :active_record_store
48
-
49
- # Use SQL instead of Active Record's schema dumper when creating the test database.
50
- # This is necessary if your schema can't be completely dumped by the schema dumper,
51
- # like if you have constraints or database-specific column types
52
- # config.active_record.schema_format = :sql
53
-
54
- # Activate observers that should always be running
55
- # config.active_record.observers = :cacher, :garbage_collector
56
-
57
- # Make Active Record use UTC-base instead of local time
58
- # config.active_record.default_timezone = :utc
59
- end
@@ -1,18 +0,0 @@
1
- # Settings specified here will take precedence over those in config/environment.rb
2
-
3
- # In the development environment your application's code is reloaded on
4
- # every request. This slows down response time but is perfect for development
5
- # since you don't have to restart the webserver when you make code changes.
6
- config.cache_classes = false
7
-
8
- # Log error messages when you accidentally call methods on nil.
9
- config.whiny_nils = true
10
-
11
- # Show full error reports and disable caching
12
- config.action_controller.consider_all_requests_local = true
13
- config.action_view.debug_rjs = true
14
- config.action_controller.perform_caching = false
15
- config.action_view.cache_template_extensions = false
16
-
17
- # Don't care if the mailer can't send
18
- config.action_mailer.raise_delivery_errors = false
@@ -1,19 +0,0 @@
1
- # Settings specified here will take precedence over those in config/environment.rb
2
-
3
- # The production environment is meant for finished, "live" apps.
4
- # Code is not reloaded between requests
5
- config.cache_classes = true
6
-
7
- # Use a different logger for distributed setups
8
- # config.logger = SyslogLogger.new
9
-
10
- # Full error reports are disabled and caching is turned on
11
- config.action_controller.consider_all_requests_local = false
12
- config.action_controller.perform_caching = true
13
- config.action_view.cache_template_loading = true
14
-
15
- # Enable serving of images, stylesheets, and javascripts from an asset server
16
- # config.action_controller.asset_host = "http://assets.example.com"
17
-
18
- # Disable delivery errors, bad email addresses will be ignored
19
- # config.action_mailer.raise_delivery_errors = false
@@ -1,22 +0,0 @@
1
- # Settings specified here will take precedence over those in config/environment.rb
2
-
3
- # The test environment is used exclusively to run your application's
4
- # test suite. You never need to work with it otherwise. Remember that
5
- # your test database is "scratch space" for the test suite and is wiped
6
- # and recreated between test runs. Don't rely on the data there!
7
- config.cache_classes = true
8
-
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
11
-
12
- # Show full error reports and disable caching
13
- config.action_controller.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Disable request forgery protection in test environment
17
- config.action_controller.allow_forgery_protection = false
18
-
19
- # Tell ActionMailer not to deliver emails to the real world.
20
- # The :test delivery method accumulates sent emails in the
21
- # ActionMailer::Base.deliveries array.
22
- config.action_mailer.delivery_method = :test
@@ -1,10 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # Inflector.inflections do |inflect|
6
- # inflect.plural /^(ox)$/i, '\1en'
7
- # inflect.singular /^(ox)en/i, '\1'
8
- # inflect.irregular 'person', 'people'
9
- # inflect.uncountable %w( fish sheep )
10
- # end
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1 +0,0 @@
1
- require RAILS_ROOT+'/config/skynet_config.rb'
@@ -1,35 +0,0 @@
1
- ActionController::Routing::Routes.draw do |map|
2
- # The priority is based upon order of creation: first created -> highest priority.
3
-
4
- # Sample of regular route:
5
- # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
6
- # Keep in mind you can assign values other than :controller and :action
7
-
8
- # Sample of named route:
9
- # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
10
- # This route can be invoked with purchase_url(:id => product.id)
11
-
12
- # Sample resource route (maps HTTP verbs to controller actions automatically):
13
- # map.resources :products
14
-
15
- # Sample resource route with options:
16
- # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
17
-
18
- # Sample resource route with sub-resources:
19
- # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
20
-
21
- # Sample resource route within a namespace:
22
- # map.namespace :admin do |admin|
23
- # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
24
- # admin.resources :products
25
- # end
26
-
27
- # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
28
- # map.root :controller => "welcome"
29
-
30
- # See how all your routes lay out with "rake routes"
31
-
32
- # Install the default routes as the lowest priority.
33
- map.connect ':controller/:action/:id'
34
- map.connect ':controller/:action/:id.:format'
35
- end
@@ -1,36 +0,0 @@
1
- # Skynet Configuration File. Should be in APP_ROOT/config/skynet_config.rb
2
- # Start skynet from within your app root with
3
- # > skynet start
4
-
5
- require 'rubygems'
6
- require 'skynet'
7
-
8
- # Load your rails app
9
- if not defined?(RAILS_GEM_VERSION)
10
- require File.expand_path(File.dirname(__FILE__)) + '/../config/environment'
11
- end
12
-
13
- Skynet::CONFIG[:SKYNET_LOG_LEVEL] = Logger::ERROR
14
- Skynet::CONFIG[:APP_ROOT] = RAILS_ROOT
15
- Skynet::CONFIG[:SKYNET_LOG_DIR] = File.expand_path(Skynet::CONFIG[:APP_ROOT]+ "/log")
16
- Skynet::CONFIG[:SKYNET_PID_DIR] = File.expand_path(Skynet::CONFIG[:APP_ROOT] + "/log")
17
- Skynet::CONFIG[:SKYNET_LOG_FILE] = "skynet_#{RAILS_ENV}.log"
18
- Skynet::CONFIG[:SKYNET_PID_FILE] = "skynet_#{RAILS_ENV}.pid"
19
-
20
-
21
- # Use the mysql message queue adapter
22
- Skynet::CONFIG[:MESSAGE_QUEUE_ADAPTER] = "Skynet::MessageQueueAdapter::Mysql"
23
-
24
- # ==================================================================
25
- # = Require any other libraries you want skynet to know about here =
26
- # ==================================================================
27
-
28
-
29
- # ===========================================
30
- # = Set your own configuration options here =
31
- # ===========================================
32
- # You can also configure skynet with
33
- # Skynet.configure(:SOME_CONFIG_OPTION => true, :SOME_OTHER_CONFIG => 3)
34
-
35
- Skynet::CONFIG[:SKYNET_LOG_LEVEL] = Logger::INFO
36
- Skynet::CONFIG[:TS_USE_RINGSERVER] = false
@@ -1,43 +0,0 @@
1
- class CreateSkynetTables < ActiveRecord::Migration
2
- def self.up
3
- create_table :skynet_message_queues do |t|
4
- t.column :id, "bigint unsigned primary key"
5
- t.column :queue_id, :integer, :default => 0
6
- t.column :tran_id, "bigint unsigned"
7
- t.column :created_on, :timestamp
8
- t.column :updated_on, :timestamp
9
- t.column :tasktype, :string
10
- t.column :task_id, 'bigint unsigned'
11
- t.column :job_id, 'bigint unsigned'
12
- t.column :raw_payload, "longtext"
13
- t.column :payload_type, :string
14
- t.column :name, :string
15
- t.column :expiry, :integer
16
- t.column :expire_time, "decimal(16,4)"
17
- t.column :iteration, :integer
18
- t.column :version, :integer
19
- t.column :timeout, "decimal(16,4)"
20
- t.column :retry, :integer, :default => 0
21
- end
22
- create_table :skynet_queue_temperature do |t|
23
- t.column :id, "bigint unsigned primary key"
24
- t.column :queue_id, :integer, :default => 0
25
- t.column :updated_on, :timestamp
26
- t.column :count, :integer, :default => 0
27
- t.column :temperature, "decimal(6,4) default 1"
28
- t.column :type, :string
29
- end
30
- add_index :skynet_message_queues, :job_id
31
- add_index :skynet_message_queues, :task_id
32
- add_index :skynet_message_queues, :tran_id, :unique => true
33
- add_index :skynet_message_queues, [:queue_id,:tasktype,:payload_type,:expire_time], :name => "index_skynet_mqueue_for_take"
34
- execute "insert into skynet_queue_temperature (queue_id,type) values (0,'master')"
35
- execute "insert into skynet_queue_temperature (queue_id,type) values (0,'any')"
36
- execute "insert into skynet_queue_temperature (queue_id,type) values (0,'task')"
37
- end
38
-
39
- def self.down
40
- drop_table :skynet_queue_temperature
41
- drop_table :skynet_message_queues
42
- end
43
- end
@@ -1,16 +0,0 @@
1
- class CreateUsers < ActiveRecord::Migration
2
- def self.up
3
- create_table :users do |t|
4
- t.string :name
5
- t.string :password
6
- t.string :favorites
7
- t.string :email
8
-
9
- t.timestamps
10
- end
11
- end
12
-
13
- def self.down
14
- drop_table :users
15
- end
16
- end
@@ -1,14 +0,0 @@
1
- class CreateUserFavorites < ActiveRecord::Migration
2
- def self.up
3
- create_table :user_favorites do |t|
4
- t.integer :user_id
5
- t.string :favorite
6
-
7
- t.timestamps
8
- end
9
- end
10
-
11
- def self.down
12
- drop_table :user_favorites
13
- end
14
- end
@@ -1,85 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead of editing this file,
2
- # please use the migrations feature of ActiveRecord to incrementally modify your database, and
3
- # then regenerate this schema definition.
4
- #
5
- # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6
- # to create the application database on another system, you should be using db:schema:load, not running
7
- # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8
- # you'll amass, the slower it'll run and the greater likelihood for issues).
9
- #
10
- # It's strongly recommended to check this file into your version control system.
11
-
12
- ActiveRecord::Schema.define(:version => 3) do
13
-
14
- create_table "skynet_message_queues", :force => true do |t|
15
- t.integer "queue_id", :default => 0
16
- t.integer "tran_id", :limit => 20
17
- t.datetime "created_on"
18
- t.datetime "updated_on"
19
- t.string "tasktype"
20
- t.integer "task_id", :limit => 20
21
- t.integer "job_id", :limit => 20
22
- t.text "raw_payload"
23
- t.string "payload_type"
24
- t.string "name"
25
- t.integer "expiry"
26
- t.decimal "expire_time", :precision => 16, :scale => 4
27
- t.integer "iteration"
28
- t.integer "version"
29
- t.decimal "timeout", :precision => 16, :scale => 4
30
- t.integer "retry", :default => 0
31
- end
32
-
33
- add_index "skynet_message_queues", ["tran_id"], :name => "index_skynet_message_queues_on_tran_id", :unique => true
34
- add_index "skynet_message_queues", ["job_id"], :name => "index_skynet_message_queues_on_job_id"
35
- add_index "skynet_message_queues", ["task_id"], :name => "index_skynet_message_queues_on_task_id"
36
- add_index "skynet_message_queues", ["queue_id", "tasktype", "payload_type", "expire_time"], :name => "index_skynet_mqueue_for_take"
37
-
38
- create_table "skynet_queue_temperature", :force => true do |t|
39
- t.integer "queue_id", :default => 0
40
- t.datetime "updated_on"
41
- t.integer "count", :default => 0
42
- t.decimal "temperature", :precision => 6, :scale => 4
43
- t.string "type"
44
- end
45
-
46
- create_table "skynet_worker_queues", :force => true do |t|
47
- t.integer "queue_id", :default => 0
48
- t.datetime "created_on"
49
- t.datetime "updated_on"
50
- t.string "tasktype"
51
- t.string "tasksubtype"
52
- t.integer "worker_id", :limit => 20
53
- t.string "hostname"
54
- t.integer "process_id"
55
- t.integer "job_id", :limit => 20
56
- t.integer "task_id", :limit => 20
57
- t.integer "iteration"
58
- t.string "name"
59
- t.string "map_or_reduce"
60
- t.decimal "started_at", :precision => 16, :scale => 4
61
- t.integer "version"
62
- t.integer "processed"
63
- t.decimal "timeout", :precision => 16, :scale => 4
64
- end
65
-
66
- add_index "skynet_worker_queues", ["worker_id"], :name => "index_skynet_worker_queues_on_worker_id", :unique => true
67
- add_index "skynet_worker_queues", ["hostname", "process_id"], :name => "index_skynet_worker_queues_on_hostname_and_process_id"
68
-
69
- create_table "user_favorites", :force => true do |t|
70
- t.integer "user_id"
71
- t.string "favorite"
72
- t.datetime "created_at"
73
- t.datetime "updated_at"
74
- end
75
-
76
- create_table "users", :force => true do |t|
77
- t.string "name"
78
- t.string "password"
79
- t.string "favorites"
80
- t.string "email"
81
- t.datetime "created_at"
82
- t.datetime "updated_at"
83
- end
84
-
85
- end
@@ -1,33 +0,0 @@
1
- CREATE TABLE skynet_message_queues (
2
- id int(11) NOT NULL auto_increment,
3
- queue_id int(11) default '0',
4
- tran_id bigint(20) unsigned default NULL,
5
- created_on datetime default NULL,
6
- updated_on datetime default NULL,
7
- tasktype varchar(255) default NULL,
8
- task_id bigint(20) unsigned default NULL,
9
- job_id bigint(20) unsigned default NULL,
10
- raw_payload longtext,
11
- payload_type varchar(255) default NULL,
12
- name varchar(255) default NULL,
13
- expiry int(11) default NULL,
14
- expire_time decimal(16,4) default NULL,
15
- iteration int(11) default NULL,
16
- version int(11) default NULL,
17
- timeout decimal(16,4) default NULL,
18
- retry int(11) default '0',
19
- PRIMARY KEY (id),
20
- UNIQUE KEY index_skynet_message_queues_on_tran_id (tran_id),
21
- KEY index_skynet_message_queues_on_job_id (job_id),
22
- KEY index_skynet_message_queues_on_task_id (task_id),
23
- KEY index_skynet_mqueue_for_take (queue_id,tasktype,payload_type,expire_time)
24
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
25
- CREATE TABLE skynet_queue_temperature (
26
- id int(11) NOT NULL auto_increment,
27
- queue_id int(11) default '0',
28
- updated_on datetime default NULL,
29
- count int(11) default '0',
30
- temperature decimal(6,4) default NULL,
31
- type varchar(255) default NULL,
32
- PRIMARY KEY (id)
33
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;