-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 'mars ingest failure model' * 'add marsingestfailure table' * 'fix migration' * 'disable non production gems' * 'missed one' * 'updated watchfolder script and mif bug fixes' * 'replace gems' * 'ah yes but some' * 'corrected watch folder sh' * 'correct env var choppin'
- Loading branch information
Showing
12 changed files
with
70 additions
and
12 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,12 @@ | ||
class MarsIngestFailuresController < ApplicationController | ||
before_action :authenticate_user! | ||
|
||
def index | ||
@mars_ingest_failures = MarsIngestFailure.order(created_at: :desc).all | ||
end | ||
|
||
def show | ||
@mars_ingest_failure = MarsIngestFailure.find(params[:id]) | ||
render 'show', layout: false, content_type: 'text/plain' | ||
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
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,2 @@ | ||
class MarsIngestFailure < ActiveRecord::Base | ||
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
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,15 @@ | ||
<% @page_title = t('mars_ingests.title', :application_name => application_name) %> | ||
|
||
<div class="page-title-wrapper"> | ||
<h1 class="page-title">Mars Ingests</h1> | ||
<% @mars_ingest_failures.each do |mif| %> | ||
|
||
<div class="row"> | ||
<div class="col-md-12 collection-btn"> | ||
Manifest URL: <%= mif.manifest_url %><br> | ||
Attempted At: <%= mif.created_at %><br> | ||
<a href="/mars_ingest_failures/<%= mif.id %>">Error</a><br> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> |
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 @@ | ||
<%= @mars_ingest_failure.error_text %> |
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,9 @@ | ||
class CreateMarsIngestFailures < ActiveRecord::Migration[5.2] | ||
def change | ||
create_table :mars_ingest_failures do |t| | ||
t.text :error_text | ||
t.text :manifest_url | ||
t.timestamps | ||
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,4 @@ | ||
# include it all | ||
require_relative '../config/environment' | ||
puts "what up yo!" | ||
MarsIngestWatcher.run |
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 |
---|---|---|
@@ -1,6 +1,16 @@ | ||
#!/usr/bin/env ruby | ||
#!/bin/bash | ||
|
||
# include it all | ||
require_relative '../config/environment' | ||
puts "what up yo!" | ||
MarsIngestWatcher.run | ||
# get em | ||
all=$(cat /proc/1/environ) | ||
# split em | ||
vars=$(echo $all | tr "\0" "\n") | ||
for var in $vars | ||
do | ||
# export em | ||
piece1 = $(echo $var | tr "=", "\n")[0] | ||
piece2 = $(echo $var | tr "=", "\n")[1] | ||
export `${piece1}=${piece2}` | ||
done | ||
|
||
# ooh ah so nice | ||
bundle exec ruby script/watch_folder.rb |