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
# Run in console | |
100.times do |i| | |
r = RubricsDenormalizationTree.order('RANDOM()').first.rubric; | |
c = Company.includes(:company_logo).where('company_logos.id is not null').order('RANDOM()').first; | |
s = [Date.yesterday, 15.days.from_now].sample | |
e = [20.days.from_now, 25.days.from_now, 30.days.from_now].sample | |
o = Apress::Deals::Offers::Custom.new( | |
title: "Акция ##{i}", | |
start_date: s, | |
end_date: e, |
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
Задачи за неделю: | |
- Фиксим Скидки. 6ч | |
- apress-clearance 3ч | |
- Разобор багов. Кирби. Автопривязка характеристик 2ч | |
- Разобор багов. Не выводятся товары на СК. Сфинкс. 1ч | |
- ЖЦТ. Смотрим гигантский PR 1ч | |
- Баг с кэшированием контактов 3ч | |
- Близко. Отзывы. Фиксим деплой на тестовый + разбор баг/не баг 4ч | |
- Обложка Поста 4ч | |
- Ежедневный просмотр ПР. 2ч/день |
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
[3009368, 12687564, 9393256, 11862258, 13050251, 13118381, 11750171, 13168974, 8674257, 12700065, 12373792, 12572119, 13140483, 9399104, 8632443, 13120081, 13027197, 13050909, 12706935, 13027476, 12770046, 10806729, 13186926, 10885377, 13065940, 13109173, 13109174, 12690030, 13014208, 12477519, 13010377, 13184889, 12573009, 11273799, 11083872, 10723259, 8673875, 12980324, 13069868, 12971753, 10360429, 13186410, 8666538, 12427870, 8627248, 11764981, 12703309, 11083910, 12698768, 11556019, 13136767, 12574657, 13185261, 10250642, 13186469] | |
(3009368, 12687564, 9393256, 11862258, 13050251, 13118381, 11750171, 13168974, 8674257, 12700065, 12373792, 12572119, 13140483, 9399104, 8632443, 13120081, 13027197, 13050909, 12706935, 13027476, 12770046, 10806729, 13186926, 10885377, 13065940, 13109173, 13109174, 12690030, 13014208, 12477519, 13010377, 13184889, 12573009, 11273799, 11083872, 10723259, 8673875, 12980324, 13069868, 12971753, 10360429, 13186410, 8666538, 12427870, 8627248, 11764981, 12703309, 11083910, 12698768 |
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
company_id = 13011776 | |
real_regions = Company.find(company_id).region_ids_for_binding.join(',') | |
ActiveRecord::Base.connection.execute <<-SQL | |
UPDATE product_regions prs SET is_deleted = true, is_public = false | |
FROM ( | |
SELECT pr.id FROM products p JOIN product_regions pr ON p.id = pr.product_id | |
AND p.company_id = #{company_id} | |
AND pr.is_deleted IS false | |
WHERE pr.region_id NOT IN (#{real_regions})) t WHERE t.id = prs.id; | |
SQL |
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
bgkey = ::BgExecutor::Configuration[:redis][:namespace] + ':bg_executor:jobs_queue' | |
job_name = 'worker:mail' # 'map_coord' | |
# Test: | |
result = [] | |
($redis.llen bgkey).times { |idx| p idx if idx % 100 == 0; val = ($redis.lindex bgkey, idx).to_s; result << val if val.include?(job_name) } | |
# And Run: | |
# result.each { |val| $redis.lrem bgkey, 0, val } | |
# NOT ($redis.llen bgkey).times { |idx| val = ($redis.lindex bgkey, idx); $redis.lrem bgkey, 0, val if val.include?(job_name) } |
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
# coding: utf-8 | |
# Public: Класс отчета по звонкам полученным от МТС | |
module Reports | |
class CompanyAttendance < ::Resque::Reports::CsvReport | |
include Resque::Reports::Common::BatchedReport | |
attr_accessor :from, :to | |
encoding CP1251 | |
directory File.join(Rails.root, 'public', 'system', 'company_attendance_csv_export') |
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
Платформа - Win32, standalone. Проверить на большом uptime. | |
Архитектура: | |
- Элементы: | |
- Кнопка | |
- Поле ввода | |
- Список со скорллом | |
- Изображение | |
- Видео (?) | |
- Блок текста |
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
Этапы: | |
1) Формализация требований | |
1.1) Как есть | |
- Элементы управления те же, но с новой версткой | |
- Страницы те же, но с новой версткой | |
1.2) Что изменяем/добавляем | |
- Видео -> интеграция видео файлов. | |
- Анимации (?) -> пока заменены видео | |
- Структура файлов для вывода (автоматизация редактирования) | |
- Абстрактный фон -> со временем + анимация |
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
Доработка МАРС, взаимодействие с API МТС: (0,5 - 1 день) | |
1) Хранение связей UN - MtsAccount, структура: | |
universal_number_accounts: | |
- universal_number - String, универсальный номер МТС | |
- mts_account_id - Integer, ID аккаунта МТС | |
mts_accounts: | |
- email - String, Почта - логин для доступа | |
- password - String - хэш пароля от аккаунта МТС | |
2) Изменение логики запроса данных (1 день) |
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
-- Предварительно -- | |
+ 1. Закрыть редактирование | |
+ 2. Отключить крон | |
+ 3. Стоп Кирби | |
-- Переиндексация с новым конфигом -- | |
+ 4. Таблицы на нове. !выполнено с ошибками! | |
(забыли таблицу product_moderations, изменения типа - product_state, |