This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35d9f72
commit af98d67
Showing
13 changed files
with
578 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[ | ||
{ | ||
"instance": "default-ubuntu-1804", | ||
"runOn": "always" | ||
}, { | ||
"instance": "all-options-ubuntu-1804", | ||
"runOn": "always" | ||
}, { | ||
"instance": "default-with-shoryuken-and-fullstaq-ubuntu-1804", | ||
"runOn": "always" | ||
}, { | ||
"instance": "http-unicorn-apache-hanami-resque-ubuntu-1804", | ||
"runOn": "always" | ||
}, { | ||
"instance": "s3-thin-nginx-padrino-delayed-job-ubuntu-1804", | ||
"runOn": "master" | ||
}, { | ||
"instance": "nullified-ubuntu-1804", | ||
"runOn": "always" | ||
}, { | ||
"instance": "maximum-override-ubuntu-1804", | ||
"runOn": "always" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# frozen_string_literal: true | ||
|
||
module Drivers | ||
module Worker | ||
class GoodJob < Drivers::Worker::Base | ||
adapter :good_job | ||
allowed_engines :good_job | ||
output filter: %i[process_count syslog queues] | ||
packages :monit | ||
|
||
def after_deploy | ||
restart_monit | ||
end | ||
alias after_undeploy after_deploy | ||
|
||
def settings | ||
super.merge(queues: node['deploy'][app['shortname']][driver_type]['queues'] || '') | ||
end | ||
|
||
def configure | ||
add_worker_monit | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe Drivers::Worker::GoodJob do | ||
let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } | ||
|
||
it 'receives and exposes app and node' do | ||
expect(driver.app).to eq aws_opsworks_app | ||
expect(driver.send(:node)).to eq node | ||
expect(driver.options).to eq({}) | ||
end | ||
|
||
it 'has the correct driver_type' do | ||
expect(driver.driver_type).to eq('worker') | ||
end | ||
|
||
it 'returns proper out data' do | ||
expect(driver.out).to eq(process_count: 2, syslog: true, queues: 'test_queue') | ||
end | ||
end |
Oops, something went wrong.