Skip to content

Instantly share code, notes, and snippets.

View nicolrx's full-sized avatar

nico_lrx nicolrx

View GitHub Profile
@nicolrx
nicolrx / google_index_worker.rb
Created February 5, 2024 15:19
Ruby on Rails Worker to Check in Google Search Console for pages that are not indexed. Then, a worker to index the page.
class GoogleIndexWorker
include Sidekiq::Worker
sidekiq_options retry: 0
require "google/apis/indexing_v3"
require 'google/apis/webmasters_v3'
include Rails.application.routes.url_helpers
# launch worker with your sitemap URL
def perform(sitemap_url)