tanga_que_extensions 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/test/test.rb +44 -0
  3. metadata +59 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 484a7709b24837cb5af0037dda93a3ec7cbeb987
4
+ data.tar.gz: aee2611cb516941f38ac8c4d73fc3f85b117b40a
5
+ SHA512:
6
+ metadata.gz: c11b1df5ae28e87d5a0c67897c4aa7d78641ac8bdd0d88fdf1629edd4789875b6b7e997975977f0368e443dcf7ac8226d5f277beee3b78b90d5be1df9a32cf00
7
+ data.tar.gz: 8ba5d1c8e73f0deaec9d6557635a4ebcdea7c358cb36f12c93b765f94eda88b074cee8992b85ad0c6788104a3076cbdcae8c8ec5e780a10b5708897498a4f8fa
data/test/test.rb ADDED
@@ -0,0 +1,44 @@
1
+ require_relative '../lib/periodic_job'
2
+ require 'active_support'
3
+ require 'active_support/core_ext'
4
+ require 'sequel'
5
+ require 'json'
6
+ require 'logger'
7
+ require 'active_record'
8
+
9
+ ActiveRecord::Base.establish_connection 'postgres://localhost/tanga_dev'
10
+ Que.connection = Sequel.connect('postgres://localhost/tanga_dev')
11
+
12
+ class QueJobStatus < ActiveRecord::Base
13
+ self.table_name = :que_job_status
14
+ end
15
+
16
+ class J < Que::Job
17
+ prepend Que::RecordJobStatus
18
+ prepend Que::NotifyDevOnFailures
19
+
20
+ class Ack < StandardError
21
+ def initialize(message, args)
22
+ @message = message
23
+ @args = args
24
+ end
25
+
26
+ def as_json(*)
27
+ { foo: @args }
28
+ end
29
+
30
+ def message
31
+ "i acked"
32
+ end
33
+ end
34
+
35
+ def run(args)
36
+ puts "J running with #{args}"
37
+ end
38
+ end
39
+
40
+ Que.mode = :async
41
+
42
+ J.enqueue({foo: 1, joe: 'args'})
43
+
44
+ gets
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tanga_que_extensions
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Peter van Wesep
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-05-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: que
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 0.9.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.9.0
27
+ description:
28
+ email:
29
+ - tanga.web.consultant@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - test/test.rb
35
+ homepage: https://www.tanga.com
36
+ licenses: []
37
+ metadata: {}
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ requirements: []
53
+ rubyforge_project:
54
+ rubygems_version: 2.4.5.1
55
+ signing_key:
56
+ specification_version: 4
57
+ summary: job scheduling stuff for tanga
58
+ test_files:
59
+ - test/test.rb