Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
web: bundle exec rackup config.ru --port ${PORT:-3000} --host ${HOST:-localhost}
worker: bundle exec good_job start
job_runs: bundle exec rake job_runs:run
mailcatcher: mailcatcher -f
webpacker: ./bin/webpack-dev-server
9 changes: 0 additions & 9 deletions app/controllers/health/health_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'job_runner/runner'

module Health
class HealthController < AbstractHealthController
private
Expand All @@ -9,14 +7,7 @@ def health_checker
database: DatabaseHealthChecker,
account_reset: AccountResetHealthChecker,
}
if job_run_healthchecks_enabled?
checkers[:job_runner_critical] = JobRunner::HealthCheckerCritical
end
MultiHealthChecker.new(**checkers)
end

def job_run_healthchecks_enabled?
IdentityConfig.store.job_run_healthchecks_enabled
end
end
end
9 changes: 0 additions & 9 deletions app/controllers/health/jobs_controller.rb

This file was deleted.

44 changes: 0 additions & 44 deletions app/models/job_run.rb

This file was deleted.

50 changes: 2 additions & 48 deletions bin/job_runs.sh
Original file line number Diff line number Diff line change
@@ -1,51 +1,5 @@
#!/bin/bash
set -euo pipefail

usage() {
cat >&2 <<EOM
usage: $(basename "$0") {start|stop|status} [PIDFILE]

Init script for IdP background job runner.

PIDFILE: if provided, fork to run in background (allowing stop/status as well)
EOM
}

run() {
echo >&2 "+ $*"
"$@"
}

if [ $# -lt 1 ] || [ $# -gt 2 ]; then
usage
exit 1
fi

PIDFILE=
if [ $# -ge 2 ]; then
PIDFILE="$2"
fi

case $1 in
start)
# If PIDFILE is given, fork into background
if [ -n "$PIDFILE" ]; then
run rbenv exec bundle exec rake "job_runs:run[$PIDFILE]" &
# save last process pid to the pidfile
echo "$!" > "$PIDFILE"
else
run rbenv exec bundle exec rake job_runs:run
fi
;;
stop)
pid="$(run cat "$PIDFILE")"
run kill -2 "$pid"
;;
status)
pid="$(run cat "$PIDFILE")"
run ps -fp "$pid"
;;
*)
usage
;;
esac
# This file can be removed when we remove the service that calls from devops
sleep 100
2 changes: 0 additions & 2 deletions config/application.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ idv_max_attempts: '5'
idv_min_age_years: '13'
idv_send_link_attempt_window_in_minutes: '10'
idv_send_link_max_attempts: '5'
job_run_healthchecks_enabled: 'true'
liveness_checking_enabled: 'false'
logins_per_ip_track_only_mode: 'false'
# LexisNexis #####################################################
Expand Down Expand Up @@ -181,7 +180,6 @@ risc_notifications_active_job_enabled: 'false'
risc_notifications_rate_limit_interval: '60'
risc_notifications_rate_limit_max_requests: '1000'
risc_notifications_rate_limit_overrides: '{"https://example.com/push":{"interval":120,"max_requests":10000}}'
ruby_workers_cron_enabled: 'true'
ruby_workers_idv_enabled: 'true'
rules_of_use_horizon_years: '6'
rules_of_use_updated_at: '2021-05-21T00:00:00Z'
Expand Down
Loading