This file contains hidden or 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
| const hoursFromNow = hours => moment().subtract(hours, 'hour').toDate() | |
| // Stalled groups table | |
| db.jobgroups.aggregate() | |
| .match({ | |
| 'jobs.1': { $exists: true }, | |
| $or: [ | |
| { | |
| lastPulledAt: { $lte: hoursFromNow(2) }, | |
| }, |
This file contains hidden or 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
| apt-get install npm | |
| sudo ln -fs /usr/bin/nodejs /usr/local/bin/node | |
| npm i -g yarn |
This file contains hidden or 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
| module ActionView | |
| module Helpers | |
| class FormBuilder | |
| include ActionView::Helpers::TagHelper | |
| include ActionView::Context | |
| def errors_for(object_name, options = {}) | |
| return if (errors = object.errors[object_name]).empty? | |
| options[:class] ||= 'form_input-errors' # default class |