Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home and so should you

Nikita ⌁ Golodenko golodenko

🏠
Working from home and so should you
View GitHub Profile
@golodenko
golodenko / checking_tasks_mt.rb
Last active Aug 10, 2020
checking_tasks_mt.rb
View checking_tasks_mt.rb
puts 'Started checking tasks parents'
started_at = Time.now
checked = 0
failed_task_ids = []
relation = ::Task.where(guide_guid: 'reply_to_message')
tasks_count = relation.count
puts "tasks to check #{tasks_count}"
View update_tasks.rb
puts 'Started updating tasks parents'
started_at = Time.now
updated = 0
updated_task_ids = []
relation = ::Task.where(guide_guid: 'reply_to_message')
tasks_count = relation.count
puts "tasks to update #{tasks_count}"
relation.find_each(batch_size: 100) do |task|
View progress.rb
ids = [233200]
ids.each do |id|
complaint = Complaint.find(id)
trace_id = SecureRandom.hex(32)
current_user = User.find(184683)
Services::Workflow.new(complaint, current_user, trace_id).complete_investigate!
::Complaints::Statuses::CheckNextActionAtWorker.perform_async(complaint_id: id)
end
View find_bad_ids.txt
tasks = ::Task::Base.where(title: 'Reply to message', created_at_from: '2020-01-01', created_at_to: '2020-07-10').to_a
puts "==== TASKS BATCH SIZE: #{tasks.size}"
arr = tasks.map(&:parent_guid).join(', ')
puts arr
puts '====== DONE'
View keybase.md

Keybase proof

I hereby claim:

  • I am golodenko on github.
  • I am golodenko (https://keybase.io/golodenko) on keybase.
  • I have a public key ASBjOQBWXFYsJSJ6n47HkYiFD4qmYOeiI1NSVYvslpXahwo

To claim this, I am signing this object:

@golodenko
golodenko / gulpfile.js
Created Aug 25, 2017
custom gulp config
View gulpfile.js
'use strict';
var gulp = require('gulp'),
path = require('path'),
del = require('del'),
rename = require('gulp-rename'),
gutil = require('gulp-util'),
plumber = require('gulp-plumber'),
portfinder = require('portfinder'),
postcss = require('gulp-postcss'),
You can’t perform that action at this time.