Skip to content

Instantly share code, notes, and snippets.

@hirobo
hirobo / mongoexport_with_query.sh
Last active August 6, 2020 11:49
Shell script for mongoexport with query
#!/bin/sh
#########################################################
# usage
#do_mongoexport '2015-04-01' '2015-04-02' 'hoge'
#########################################################
get_millis()
{
if [ $# != 1 ]; then
# do only retry if not yet retried
def retry_failure
(Resque::Failure.count-1).downto(0).each do |i|
job = Resque::Failure.all(i, 1)
puts job['queue']
puts job['failed_at']
puts "retried_at: #{job['retried_at'].present?}"
puts job['error'][0..512]
if !job['retried_at'].present?
puts "requeue: #{i}"
@hirobo
hirobo / test.svg
Last active December 14, 2017 14:06
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.