cuetip 1.3.0 → 1.3.1
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 +4 -4
- data/bin/cuetip-test +24 -0
- data/db/migrate/20180104161110_create_cuetip_queued_jobs_table.rb +44 -0
- data/db/migrate/20180104161500_create_cuetip_job_queue_table.rb +12 -0
- data/db/migrate/20190314172700_increase_size_of_cuetip_job_exception_backtrace.rb +8 -0
- data/lib/cuetip/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e9aebb60664b45a63f42cd3c2ac7609210f7d82d226b4e74ce254f9cf37c055
|
4
|
+
data.tar.gz: 55d9625c5c8ea1591c47c0e3b05230e9c0639c74b036f1098a6a624832d6475b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91dd8d0ca28b56a527bddec23cfb0a61f27ee46b1b21c6559a4e02558d955a46c4b52b372897ac5d462bf1a86574823927daa0e096c802ed4f1ccf4ccc9f01e2
|
7
|
+
data.tar.gz: 7d68c6ba7110d839a233f47f4504e66d04565f3b9e916abc9dbe10faddc52e2d1fed1959400e804bc5699305cde7b6088578940a84c40bb00585763b1a0c3cd2
|
data/bin/cuetip-test
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
$:.unshift(File.expand_path('../../lib', __FILE__))
|
2
|
+
|
3
|
+
require 'active_record'
|
4
|
+
require 'mysql2'
|
5
|
+
require 'cuetip/worker_group'
|
6
|
+
|
7
|
+
ActiveRecord::Base.establish_connection adapter: "mysql2", database: "cuetip", username: "root"
|
8
|
+
ActiveRecord::Migrator.migrate(File.expand_path('../../db/migrate', __FILE__))
|
9
|
+
|
10
|
+
require 'cuetip'
|
11
|
+
|
12
|
+
# Log everything
|
13
|
+
Cuetip.logger.level = Logger::DEBUG
|
14
|
+
|
15
|
+
class TestJob < Cuetip::Job
|
16
|
+
def perform
|
17
|
+
puts "TestTask Running"
|
18
|
+
sleep 1
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
10.times { TestJob.queue }
|
23
|
+
worker = Cuetip::WorkerGroup.new(2)
|
24
|
+
worker.start
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/core_ext/numeric/bytes'
|
4
|
+
|
5
|
+
class CreateCuetipQueuedJobsTable < ActiveRecord::Migration[5.0]
|
6
|
+
def change
|
7
|
+
create_table :cuetip_jobs do |t|
|
8
|
+
t.string :class_name
|
9
|
+
t.text :params, limit: 1.megabyte
|
10
|
+
t.datetime :run_after
|
11
|
+
t.integer :executions, default: 0
|
12
|
+
|
13
|
+
# Status
|
14
|
+
t.string :status
|
15
|
+
|
16
|
+
# Timings
|
17
|
+
t.datetime :started_at
|
18
|
+
t.datetime :finished_at
|
19
|
+
|
20
|
+
# Exceptions
|
21
|
+
t.string :exception_class
|
22
|
+
t.string :exception_message
|
23
|
+
t.text :exception_backtrace
|
24
|
+
|
25
|
+
# Config options
|
26
|
+
t.string :queue_name
|
27
|
+
t.integer :maximum_execution_time
|
28
|
+
t.integer :ttl
|
29
|
+
t.integer :retry_count
|
30
|
+
t.integer :retry_interval
|
31
|
+
t.integer :delay_execution
|
32
|
+
|
33
|
+
# Add a parent
|
34
|
+
t.string :associated_object_type
|
35
|
+
t.bigint :associated_object_id
|
36
|
+
|
37
|
+
t.timestamps null: true
|
38
|
+
|
39
|
+
t.index :associated_object_id
|
40
|
+
t.index :class_name, length: 10
|
41
|
+
t.index :status, length: 10
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateCuetipJobQueueTable < ActiveRecord::Migration[5.0]
|
4
|
+
def change
|
5
|
+
create_table :cuetip_job_queue do |t|
|
6
|
+
t.integer :job_id
|
7
|
+
t.string :queue_name, :locked_by
|
8
|
+
t.datetime :locked_at
|
9
|
+
t.datetime :run_after
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class IncreaseSizeOfCuetipJobExceptionBacktrace < ActiveRecord::Migration[5.0]
|
4
|
+
def change
|
5
|
+
change_column :cuetip_jobs, :exception_backtrace, :text, limit: 2.megabytes
|
6
|
+
change_column :cuetip_jobs, :exception_message, :text, limit: 2.megabytes
|
7
|
+
end
|
8
|
+
end
|
data/lib/cuetip/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuetip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Cooke
|
@@ -47,6 +47,10 @@ extensions: []
|
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
49
|
- bin/cuetip
|
50
|
+
- bin/cuetip-test
|
51
|
+
- db/migrate/20180104161110_create_cuetip_queued_jobs_table.rb
|
52
|
+
- db/migrate/20180104161500_create_cuetip_job_queue_table.rb
|
53
|
+
- db/migrate/20190314172700_increase_size_of_cuetip_job_exception_backtrace.rb
|
50
54
|
- lib/cuetip.rb
|
51
55
|
- lib/cuetip/config.rb
|
52
56
|
- lib/cuetip/engine.rb
|