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
| Delayed::Backend::ActiveRecord::Job.class_eval do | |
| def self.build_ready_scope(worker, max_run_time) | |
| ready_scope = ready_to_run(worker.name, max_run_time) | |
| ready_scope = ready_scope.by_priority | |
| ready_scope = ready_scope.where( | |
| RandomUserIdQuery::SQL, db_time_now: db_time_now, | |
| worker_name: worker.name, | |
| locked_at_expired_at: db_time_now - max_run_time | |
| ) |
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
| def self.reserve(worker, max_run_time = Worker.max_run_time) | |
| ready_scope = ready_to_run(worker.name, max_run_time) | |
| ready_scope = ready_scope.by_priority | |
| reserve_with_scope(ready_scope, worker, db_time_now) | |
| end |
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
| function g() { | |
| if [[ $# == '0' ]]; then | |
| git status | |
| else | |
| case $1 in | |
| fuss) | |
| shift | |
| git rebase -i HEAD~"$1";; | |
| *) | |
| git "$@";; |
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
| chpwd() { | |
| ls | |
| git status > /tmp/git_status_output.txt 2>&1 | |
| if [[ $? == 0 ]]; then | |
| echo | |
| git status | |
| fi | |
| } |