skyrunner 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8928e9988b2964b41819825a1b47adf1a458338d
4
- data.tar.gz: cfbd389efd794094ce4be1f465dfff0252b976d4
3
+ metadata.gz: 3719145b17af249ee01342acbda794e639801c69
4
+ data.tar.gz: c948644f06dc6c2368e1fc71be87c9c6cab0f969
5
5
  SHA512:
6
- metadata.gz: befca88f0e29654d83dafb5539a973c5b9f39fd52db3e72edf34e2ce55e529e738691835701c308dc62ebb9057133998c41ffd710c806e72e238df53bf8e3400
7
- data.tar.gz: e180a3849b4f5b1891eb681e1786826464612be54dbc523328b2c442c9390e23b9bacc869ba9049ac4bf9fbbf2ca7ab54353fc35fb7cdbd01b245fe304bfca8f
6
+ metadata.gz: accdfca7b2da85aa963b9c5ed1b0d715524e2a73e6b6c330f10fec644c79a38d0bebb0657a7fe4af59b0c06ca797c5cc23cb8a8f2acbaccbc30b940d63ba3018
7
+ data.tar.gz: 41d3ac3bfeaca3768e64bbe4f46af7b2c4944d3a4bfc447b7ed91caf72ebedefa651bdb1d92362db79486b2334eba1834edb7f602d37a19742fa157a774b26fe
@@ -0,0 +1,25 @@
1
+ require 'rails/generators'
2
+
3
+ module Gemname
4
+ class InstallGenerator < Rails::Generators::Base
5
+ desc "Generator for SkyRunner configuration files."
6
+
7
+ # Commandline options can be defined here using Thor-like options:
8
+ #class_option :my_opt, :type => :boolean, :default => false, :desc => "My Option"
9
+
10
+ # I can later access that option using:
11
+ # options[:my_opt]
12
+
13
+
14
+ def self.source_root
15
+ @source_root ||= File.join(File.dirname(__FILE__), 'templates')
16
+ end
17
+
18
+ # Generator Code. Remember this is just suped-up Thor so methods are executed in order
19
+
20
+ def create_initializer_file
21
+ copy_file "config/initializers/skyrunner.rb", "config/initializers/skyrunner.rb"
22
+ end
23
+ end
24
+ end
25
+
@@ -0,0 +1,17 @@
1
+ SkyRunner.setup do |config|
2
+ # Customize these to change the name of the table & queue used for job and task management.
3
+ config.dynamo_db_table_name = "skyrunner_jobs_#{Rails.env}"
4
+ config.sqs_queue_name = "skyrunner_tasks_#{Rails.env}"
5
+
6
+ # Customzie this to change the namespace of jobs enqueued and consumed by this application.
7
+ config.job_namespace = Rails.application.class.parent_name.underscore
8
+
9
+ # Set the number of tasks for a consumer to pull and run from SQS at a time. (Max 10, default 10)
10
+ #
11
+ # config.consumer_batch_size = 10
12
+
13
+ # Set the visibility timeout of queue items. If the consumer batch size (above) is set to 10,
14
+ # this should provide sufficient time for a consumer to process 10 tasks, for example. (default 90)
15
+ #
16
+ # config.visibility_timeout = 90
17
+ end
@@ -0,0 +1,7 @@
1
+ require "rails"
2
+
3
+ module SkyRunner
4
+ class Engine < Rails::Engine
5
+ end
6
+ end
7
+
@@ -1,3 +1,3 @@
1
1
  module Skyrunner
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/skyrunner.rb CHANGED
@@ -7,6 +7,8 @@ require "json"
7
7
  require "set"
8
8
 
9
9
  module SkyRunner
10
+ require "skyrunner/engine" if defined?(Rails)
11
+
10
12
  SQS_MAX_BATCH_SIZE = 10 # Constant defined by AWS
11
13
 
12
14
  def self.setup
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skyrunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Fodor
@@ -110,7 +110,10 @@ files:
110
110
  - Rakefile
111
111
  - bin/skyrunner
112
112
  - jobs/example_job.rb
113
+ - lib/generators/skyrunner/install_generator.rb
114
+ - lib/generators/skyrunner/templates/config/initializers/skyrunner.rb
113
115
  - lib/skyrunner.rb
116
+ - lib/skyrunner/engine.rb
114
117
  - lib/skyrunner/job.rb
115
118
  - lib/skyrunner/version.rb
116
119
  - skyrunner.gemspec
@@ -140,4 +143,3 @@ specification_version: 4
140
143
  summary: SkyRunner runs logical jobs that are broken up into tasks via Amazon SQS
141
144
  and DynamoDB.
142
145
  test_files: []
143
- has_rdoc: