lex-tasker 0.2.0 → 0.2.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/Dockerfile +9 -0
- data/bitbucket-pipelines.yml +4 -54
- data/docker_deploy.rb +13 -0
- data/lib/legion/extensions/tasker/helpers/fetch_delayed.rb +3 -3
- data/lib/legion/extensions/tasker/helpers/find_subtask.rb +2 -2
- data/lib/legion/extensions/tasker/version.rb +1 -1
- metadata +4 -4
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 629167fdc22f492d3458b37b1414c66c1f89d61ba843d787126901a36653fc42
|
4
|
+
data.tar.gz: 8962a825f8fe27b0abd990b12d94e540fba3103bce7fb73a3dd0190a5701610d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55dbbe3d90fa1e06a04321cc36d9f18d44266112dff7956e0e5a46513d350486a65b4000f210b7822c540efc71b5dd2bc1c737160265f48e0316fb983ab60e6a
|
7
|
+
data.tar.gz: e2ddca1cf4926788cecc1d6a6b3953d0bbf718d6aeaa2be442f51d6e7e222c0614e78fbdaa402b5f0d5716af5b5f09759cf5cb9a315d7b539d95c122510549b2
|
data/Dockerfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
FROM legionio/legion:latest
|
2
|
+
LABEL maintainer="Matthew Iverson <matthewdiverson@gmail.com>"
|
3
|
+
|
4
|
+
RUN mkdir /etc/legionio
|
5
|
+
RUN apk update && apk add build-base tzdata postgresql-dev mysql-client mariadb-dev tzdata gcc git
|
6
|
+
|
7
|
+
COPY . ./
|
8
|
+
RUN gem install lex-tasker legion-data --no-document --no-prerelease
|
9
|
+
CMD ruby $(which legionio)
|
data/bitbucket-pipelines.yml
CHANGED
@@ -3,67 +3,17 @@ image: ruby:2.7
|
|
3
3
|
pipelines:
|
4
4
|
tags:
|
5
5
|
"v*":
|
6
|
-
- step:
|
7
|
-
name: Rubocop
|
8
|
-
caches:
|
9
|
-
- bundler
|
10
|
-
script:
|
11
|
-
- gem install rubocop
|
12
|
-
- gem update rubocop
|
13
|
-
- rubocop
|
14
|
-
- step:
|
15
|
-
name: RSpec
|
16
|
-
caches:
|
17
|
-
- bundler
|
18
|
-
script:
|
19
|
-
- gem install bundler
|
20
|
-
- gem update bundler
|
21
|
-
- bundle update
|
22
|
-
- bundle exec rspec
|
23
6
|
- step:
|
24
7
|
name: Push to RubyGems
|
25
8
|
deployment: RubyGems
|
26
9
|
script:
|
27
|
-
- gem install
|
28
|
-
- bundle install
|
10
|
+
- gem install gem-release
|
29
11
|
- (umask 077 ; echo $gem_creds | base64 --decode > ~/.gem/credentials)
|
30
12
|
- gem release
|
31
13
|
artifacts:
|
32
14
|
- pkg/**
|
33
|
-
branches:
|
34
|
-
master:
|
35
|
-
- step:
|
36
|
-
caches:
|
37
|
-
- bundler
|
38
|
-
script:
|
39
|
-
- gem install rubocop
|
40
|
-
- gem update rubocop
|
41
|
-
- rubocop
|
42
15
|
- step:
|
43
|
-
|
44
|
-
|
16
|
+
name: Push to Docker
|
17
|
+
deployment: Docker
|
45
18
|
script:
|
46
|
-
-
|
47
|
-
- gem update bundler
|
48
|
-
- bundle update
|
49
|
-
- bundle exec rspec
|
50
|
-
develop:
|
51
|
-
- step:
|
52
|
-
caches:
|
53
|
-
- bundler
|
54
|
-
script:
|
55
|
-
- gem install rubocop
|
56
|
-
- gem update rubocop
|
57
|
-
- rubocop
|
58
|
-
- step:
|
59
|
-
caches:
|
60
|
-
- bundler
|
61
|
-
script:
|
62
|
-
- gem install bundler
|
63
|
-
- gem update bundler
|
64
|
-
- bundle update
|
65
|
-
- bundle exec rspec
|
66
|
-
|
67
|
-
definitions:
|
68
|
-
caches:
|
69
|
-
bundler: /usr/local/bundle
|
19
|
+
- './docker_deploy.rb'
|
data/docker_deploy.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
name = 'tasker'
|
4
|
+
require "./lib/legion/extensions/#{name}/version"
|
5
|
+
version = Legion::Extensions::Tasker::VERSION
|
6
|
+
|
7
|
+
puts "Building docker image for Legion v#{version}"
|
8
|
+
system("docker build --tag legionio/lex-#{name}:v#{version} .")
|
9
|
+
puts 'Pushing to hub.docker.com'
|
10
|
+
system("docker push legionio/lex-#{name}:v#{version}")
|
11
|
+
system("docker tag legionio/lex-#{name}:v#{version} legionio/lex-#{name}:latest")
|
12
|
+
system("docker push legionio/lex-#{name}:latest")
|
13
|
+
puts 'completed'
|
@@ -32,7 +32,7 @@ module Legion
|
|
32
32
|
LEFT JOIN legion.relationships ON (relationships.id = tasks.relationship_id)
|
33
33
|
WHERE status = \'task.delayed\';'
|
34
34
|
|
35
|
-
Legion::Data::Connection.sequel.fetch(sql)
|
35
|
+
Legion::Data::Connection.sequel.fetch(sql).all
|
36
36
|
end
|
37
37
|
|
38
38
|
def find_subtasks(trigger_id:, **)
|
@@ -55,8 +55,8 @@ module Legion
|
|
55
55
|
cache = Legion::Cache.get(sql)
|
56
56
|
return cache unless cache.nil?
|
57
57
|
|
58
|
-
results = Legion::Data::Connection.sequel.fetch(sql)
|
59
|
-
Legion::Cache.set(sql, results,
|
58
|
+
results = Legion::Data::Connection.sequel.fetch(sql).all
|
59
|
+
Legion::Cache.set(sql, results, 5) if results.is_a?(Array) && results.count.positive?
|
60
60
|
results
|
61
61
|
end
|
62
62
|
end
|
@@ -38,8 +38,8 @@ module Legion
|
|
38
38
|
cache = Legion::Cache.get(sql)
|
39
39
|
return cache unless cache.nil?
|
40
40
|
|
41
|
-
results = Legion::Data::Connection.sequel.fetch(sql)
|
42
|
-
Legion::Cache.set(sql, results,
|
41
|
+
results = Legion::Data::Connection.sequel.fetch(sql).all
|
42
|
+
Legion::Cache.set(sql, results, 5) if results.is_a?(Array) && results.count.positive?
|
43
43
|
results
|
44
44
|
end
|
45
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lex-tasker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esity
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -105,14 +105,14 @@ files:
|
|
105
105
|
- ".gitignore"
|
106
106
|
- ".rspec"
|
107
107
|
- ".rubocop.yml"
|
108
|
+
- Dockerfile
|
108
109
|
- Gemfile
|
109
110
|
- Gemfile.lock
|
110
111
|
- LICENSE.txt
|
111
112
|
- README.md
|
112
113
|
- Rakefile
|
113
|
-
- bin/console
|
114
|
-
- bin/setup
|
115
114
|
- bitbucket-pipelines.yml
|
115
|
+
- docker_deploy.rb
|
116
116
|
- lex-tasker.gemspec
|
117
117
|
- lib/legion/extensions/tasker.rb
|
118
118
|
- lib/legion/extensions/tasker/actors/check_subtask.rb
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'legion/extensions/tasker'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
IRB.start(__FILE__)
|