Skip to content

Commit

Permalink
Add common parse task
Browse files Browse the repository at this point in the history
  • Loading branch information
imustafin committed Dec 4, 2024
1 parent 57370aa commit 8a1c0b8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/tasks/parse.rake
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
require 'net/http'

namespace :parse do
desc 'Parse all known sources'
task all: [:vk_si_game, :vk_si_2, :vk_si_2_old]

desc "Parse packages from https://vk.com/topic-135725718_34975471"
task vk_si_game: :environment do
ParseBoardWorker.perform_async(135725718, 34975471)
end

desc "Parse packages from https://vk.com/topic-228528109_53000017"
desc "Parse packages from https://vk.com/topic-228528109_53000017 (new board)"
task vk_si_2: :environment do
ParseBoardWorker.perform_async(228528109, 53000017)
end

desc "Parse packages from https://vk.com/topic-228528109_53002500 (old packages)"
task vk_si_2_old: :environment do
ParseBoardWorker.perform_async(228528109, 53002500)
end

desc "Parse one post by post id synchronously"
task :vk_si_game_one, [:id] => :environment do |t, args|
ParseBoardWorker.new.parse_one_post(135725718, 34975471, args[:id])
Expand Down

0 comments on commit 8a1c0b8

Please sign in to comment.