repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/delete_old_versions_records_worker.rb | app/sidekiq/delete_old_versions_records_worker.rb | # frozen_string_literal: true
class DeleteOldVersionsRecordsWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
MAX_ALLOWED_ROWS = 100_000_000
DELETION_BATCH_SIZE = 100
# Counting rows is not free, so we're relying on the fact that ids are consecutive instead.
def perform
max_id = Paper... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/create_missing_purchase_events_worker.rb | app/sidekiq/create_missing_purchase_events_worker.rb | # frozen_string_literal: true
class CreateMissingPurchaseEventsWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :low
def perform(date = Date.yesterday)
purchases = Purchase.successful.left_joins(:events).
where("purchases.created_at >= ? and purchases.created_at < ?", date, date.tomorrow).... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/payout_users_worker.rb | app/sidekiq/payout_users_worker.rb | # frozen_string_literal: true
class PayoutUsersWorker
include Sidekiq::Job
sidekiq_options retry: 0, queue: :default, lock: :until_executed
def perform(date_string, processor_type, user_ids, payout_type = Payouts::PAYOUT_TYPE_STANDARD)
PayoutUsersService.new(date_string:,
processo... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/renew_facebook_access_tokens_worker.rb | app/sidekiq/renew_facebook_access_tokens_worker.rb | # frozen_string_literal: true
class RenewFacebookAccessTokensWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :critical
def perform
users = User.where("updated_at > ? AND facebook_access_token IS NOT NULL", Date.today - 30)
users.find_each do |user|
user.renew_facebook_access_token
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/block_suspended_account_ip_worker.rb | app/sidekiq/block_suspended_account_ip_worker.rb | # frozen_string_literal: true
class BlockSuspendedAccountIpWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(user_id)
user = User.find(user_id)
return if user.last_sign_in_ip.blank?
return if User.where(
"(current_sign_in_ip = :ip OR last_sign_in_ip = :ip OR acc... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/purge_old_deleted_asset_previews_worker.rb | app/sidekiq/purge_old_deleted_asset_previews_worker.rb | # frozen_string_literal: true
class PurgeOldDeletedAssetPreviewsWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :low
DELETION_BATCH_SIZE = 100
def perform(to: 1.month.ago)
loop do
asset_previews = AssetPreview.deleted.where("deleted_at < ?", to).limit(DELETION_BATCH_SIZE).load
bre... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/generate_large_sellers_analytics_cache_worker.rb | app/sidekiq/generate_large_sellers_analytics_cache_worker.rb | # frozen_string_literal: true
class GenerateLargeSellersAnalyticsCacheWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :low, lock: :until_executed
def perform
User.joins(:large_seller).find_each do |user|
CreatorAnalytics::CachingProxy.new(user).generate_cache
rescue => e
Bugsnag... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/schedule_membership_price_updates_job.rb | app/sidekiq/schedule_membership_price_updates_job.rb | # frozen_string_literal: true
class ScheduleMembershipPriceUpdatesJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform(tier_id)
tier = Variant.find(tier_id)
return unless tier.apply_price_changes_to_existing_memberships?
product = tier.link
return unless product.is_tiered_... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_stripe_currency_balances_report_job.rb | app/sidekiq/send_stripe_currency_balances_report_job.rb | # frozen_string_literal: true
class SendStripeCurrencyBalancesReportJob
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed, on_conflict: :replace
def perform
return unless Rails.env.production?
balances_csv = StripeCurrencyBalancesReport.stripe_currency_balances_repor... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_bundles_marketing_email_job.rb | app/sidekiq/send_bundles_marketing_email_job.rb | # frozen_string_literal: true
class SendBundlesMarketingEmailJob
MINIMUM_PRODUCTS_PER_BUNDLE = 2
LAST_YEAR = 1.year.ago.year
def perform
User.not_suspended
.where(deleted_at: nil)
.joins(:payments)
.merge(Payment.completed.where(created_at: 1.year.ago..))
.select("users.id, u... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/end_subscription_worker.rb | app/sidekiq/end_subscription_worker.rb | # frozen_string_literal: true
class EndSubscriptionWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(subscription_id)
subscription = Subscription.find(subscription_id)
return if subscription.is_test_subscription?
return unless subscription.alive?(include_pending_cance... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/cache_unreviewed_users_data_worker.rb | app/sidekiq/cache_unreviewed_users_data_worker.rb | # frozen_string_literal: true
class CacheUnreviewedUsersDataWorker
include Sidekiq::Job
sidekiq_options retry: 2, queue: :default
def perform
Admin::UnreviewedUsersService.cache_users_data!
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/set_subscription_as_deactivated_worker.rb | app/sidekiq/set_subscription_as_deactivated_worker.rb | # frozen_string_literal: true
class SetSubscriptionAsDeactivatedWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default, lock: :until_executed
def perform(subscription_id)
subscription = Subscription.find(subscription_id)
return if subscription.alive?
subscription.deactivate!
end
end... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/block_email_domains_worker.rb | app/sidekiq/block_email_domains_worker.rb | # frozen_string_literal: true
class BlockEmailDomainsWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(author_id, email_domains)
email_domains.each do |email_domain|
BlockedObject.block!(BLOCKED_OBJECT_TYPES[:email_domain], email_domain, author_id)
end
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/google_calendar_invite_job.rb | app/sidekiq/google_calendar_invite_job.rb | # frozen_string_literal: true
class GoogleCalendarInviteJob
include Sidekiq::Job
def perform(call_id)
call = Call.find(call_id)
return if call.google_calendar_event_id.present?
link = call.link
buyer = call.purchase.purchaser&.email || call.purchase.email
google_calendar_integration = link.g... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/annual_payout_export_worker.rb | app/sidekiq/annual_payout_export_worker.rb | # frozen_string_literal: true
class AnnualPayoutExportWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :low
def perform(user_id, year, send_email = false)
user = User.find user_id
payout_data = nil
WithMaxExecutionTime.timeout_queries(seconds: 1.hour) do
payout_data = Exports::Pay... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/seller_updates_worker.rb | app/sidekiq/seller_updates_worker.rb | # frozen_string_literal: true
class SellerUpdatesWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed
def perform
User.by_sales_revenue(days_ago: 7.days.ago, limit: nil) do |user|
SellerUpdateWorker.perform_async(user.id)
end
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/calculate_sale_numbers_worker.rb | app/sidekiq/calculate_sale_numbers_worker.rb | # frozen_string_literal: true
class CalculateSaleNumbersWorker
include Sidekiq::Job
sidekiq_options retry: 2, queue: :default
def perform
calculate_stats_for_all_purchases
end
private
def calculate_stats_for_all_purchases
aggregations_body = {
total_made: {
sum: { field: "pr... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/stamp_pdf_for_purchase_job.rb | app/sidekiq/stamp_pdf_for_purchase_job.rb | # frozen_string_literal: true
# Stamps PDF(s) for a purchase
class StampPdfForPurchaseJob
include Sidekiq::Job
sidekiq_options queue: :default, retry: 5, lock: :until_executed
def perform(purchase_id, notify_buyer = false)
purchase = Purchase.find(purchase_id)
PdfStampingService.stamp_for_purchase!(purc... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/handle_stripe_autodebit_for_negative_balance.rb | app/sidekiq/handle_stripe_autodebit_for_negative_balance.rb | # frozen_string_literal: true
class HandleStripeAutodebitForNegativeBalance
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(stripe_event_id, stripe_connect_account_id, stripe_payout_id)
@stripe_connect_account_id = stripe_connect_account_id
@stripe_payout_id = stripe_payout_id... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/handle_sns_transcoder_event_worker.rb | app/sidekiq/handle_sns_transcoder_event_worker.rb | # frozen_string_literal: true
class HandleSnsTranscoderEventWorker
include Sidekiq::Job
include TranscodeEventHandler
sidekiq_options retry: 5, queue: :default
def perform(params)
if params["Type"] == "Notification"
message = JSON.parse(params["Message"])
job_id = message["jobId"]
state... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/analyze_file_worker.rb | app/sidekiq/analyze_file_worker.rb | # frozen_string_literal: true
class AnalyzeFileWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low, lock: :until_executed
def perform(id, analyzable_klass_name = ProductFile.name)
return if Rails.env.test?
analyzable_klass_name.constantize.find(id).analyze
rescue Aws::S3::Errors::NotFou... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/calculate_payout_numbers_worker.rb | app/sidekiq/calculate_payout_numbers_worker.rb | # frozen_string_literal: true
class CalculatePayoutNumbersWorker
include Sidekiq::Job
sidekiq_options retry: 2, queue: :default
def perform
now = Time.now.in_time_zone("America/Los_Angeles")
beginning_of_last_week = now.prev_week
end_of_last_week = beginning_of_last_week.end_of_week
search_resul... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_charge_receipt_job.rb | app/sidekiq/send_charge_receipt_job.rb | # frozen_string_literal: true
# Job used to send the initial receipt email after checkout for a given charge.
# If there are PDFs that need to be stamped, the caller must enqueue this job using the "default" queue
#
class SendChargeReceiptJob
include Sidekiq::Job
sidekiq_options queue: :critical, retry: 5, lock: :... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_community_chat_recap_notifications_job.rb | app/sidekiq/send_community_chat_recap_notifications_job.rb | # frozen_string_literal: true
class SendCommunityChatRecapNotificationsJob
include Sidekiq::Job
sidekiq_options queue: :low, lock: :until_executed
def perform(community_chat_recap_run_id)
recap_run = CommunityChatRecapRun.find(community_chat_recap_run_id)
return unless recap_run.finished?
communit... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/delete_old_sent_email_info_records_job.rb | app/sidekiq/delete_old_sent_email_info_records_job.rb | # frozen_string_literal: true
class DeleteOldSentEmailInfoRecordsJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
VALID_DURATION = 1.year
DELETION_BATCH_SIZE = 100
def perform
return unless SentEmailInfo.exists?
loop do
ReplicaLagWatcher.watch
rows = SentEmailInfo.where("... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/reissue_ssl_certificate_for_updated_custom_domains.rb | app/sidekiq/reissue_ssl_certificate_for_updated_custom_domains.rb | # frozen_string_literal: true
class ReissueSslCertificateForUpdatedCustomDomains
include Sidekiq::Job
sidekiq_options retry: 0, queue: :low
def perform
CustomDomain.alive.where.not(ssl_certificate_issued_at: nil).find_each do |custom_domain|
verification_service = CustomDomainVerificationService.new(d... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/expire_stamped_pdfs_job.rb | app/sidekiq/expire_stamped_pdfs_job.rb | # frozen_string_literal: true
class ExpireStampedPdfsJob
include Sidekiq::Job
sidekiq_options queue: :low, retry: 5
RECENTNESS_LIMIT = 3.months
BATCH_SIZE = 100
def perform
loop do
ReplicaLagWatcher.watch
records = StampedPdf.alive.includes(:url_redirect, :product_file).where(created_at: ..... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/create_vat_report_job.rb | app/sidekiq/create_vat_report_job.rb | # frozen_string_literal: true
class CreateVatReportJob
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed, on_conflict: :replace
DEFAULT_VAT_RATE_TYPE = "Standard"
REDUCED_VAT_RATE_TYPE = "Reduced"
def perform(quarter, year)
raise ArgumentError, "Invalid quarter" unle... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_to_elasticsearch_worker.rb | app/sidekiq/send_to_elasticsearch_worker.rb | # frozen_string_literal: true
class SendToElasticsearchWorker
include Sidekiq::Job
sidekiq_options retry: 10, queue: :default
def perform(link_id, action, attributes_to_update = [])
return if (product = Link.find_by(id: link_id)).nil?
ProductIndexingService.perform(
product:,
action:,
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/perform_daily_instant_payouts_worker.rb | app/sidekiq/perform_daily_instant_payouts_worker.rb | # frozen_string_literal: true
class PerformDailyInstantPayoutsWorker
include Sidekiq::Job
sidekiq_options retry: 0, queue: :critical, lock: :until_executed
def perform
payout_period_end_date = Date.yesterday
Rails.logger.info("AUTOMATED DAILY INSTANT PAYOUTS: #{payout_period_end_date} (Started)")
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_deferred_refunds_report_worker.rb | app/sidekiq/send_deferred_refunds_report_worker.rb | # frozen_string_literal: true
class SendDeferredRefundsReportWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed, on_conflict: :replace
def perform
return unless Rails.env.production?
last_month = Time.current.last_month
AccountingMailer.deferred_refunds_rep... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/handle_sns_mediaconvert_event_worker.rb | app/sidekiq/handle_sns_mediaconvert_event_worker.rb | # frozen_string_literal: true
class HandleSnsMediaconvertEventWorker
include Sidekiq::Job
include TranscodeEventHandler
sidekiq_options retry: 5, queue: :default
ERROR_STATUS = "ERROR"
def perform(notification)
return unless notification["Type"] == "Notification"
message = JSON.parse(notification[... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/generate_ssl_certificate.rb | app/sidekiq/generate_ssl_certificate.rb | # frozen_string_literal: true
class GenerateSslCertificate
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform(id)
if SslCertificates::Generate.supported_environment?
custom_domain = CustomDomain.find(id)
return if custom_domain.deleted? # The domain was deleted after this job... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/regenerate_sales_related_products_infos_job.rb | app/sidekiq/regenerate_sales_related_products_infos_job.rb | # frozen_string_literal: true
# WARNING: This job can be very slow, and add a lot of rows to the DB.
# It is only meant for rare cases, for example: improving quality of recommendations for a VIP creator's product.
# It should NOT be run for more than a few of products at time.
class RegenerateSalesRelatedProductsInfo... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_tax_rates_job.rb | app/sidekiq/update_tax_rates_job.rb | # frozen_string_literal: true
class UpdateTaxRatesJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform
summary_rates = client.summary_rates
summary_rates.select { |summary_rate| Compliance::Countries::EU_VAT_APPLICABLE_COUNTRY_CODES.include?(summary_rate.country_code) || tax_... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/handle_sendgrid_event_job.rb | app/sidekiq/handle_sendgrid_event_job.rb | # frozen_string_literal: true
class HandleSendgridEventJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform(params)
events = params["_json"]
events = [events] unless events.is_a?(Array) # Handling potential SendGrid weirdness where sometimes it might not give us an array.
even... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/handle_new_user_compliance_info_worker.rb | app/sidekiq/handle_new_user_compliance_info_worker.rb | # frozen_string_literal: true
class HandleNewUserComplianceInfoWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(user_compliance_info_id)
user_compliance_info = UserComplianceInfo.find(user_compliance_info_id)
StripeMerchantAccountManager.handle_new_user_compliance_info(u... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/recurring_charge_reminder_worker.rb | app/sidekiq/recurring_charge_reminder_worker.rb | # frozen_string_literal: true
class RecurringChargeReminderWorker
include Sidekiq::Job
sidekiq_options retry: 3, queue: :default
def perform(subscription_id)
subscription = Subscription.find(subscription_id)
return if !subscription.alive?(include_pending_cancellation: false) ||
subscriptio... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/create_us_state_monthly_sales_reports_job.rb | app/sidekiq/create_us_state_monthly_sales_reports_job.rb | # frozen_string_literal: true
# Usage example for the month of August 2022 in the state of Washington:
#
# CreateUsStateMonthlySalesReportsJob.perform_async("WA", 8, 2022)
class CreateUsStateMonthlySalesReportsJob
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed
attr_reader ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/force_finish_long_running_community_chat_recap_runs_job.rb | app/sidekiq/force_finish_long_running_community_chat_recap_runs_job.rb | # frozen_string_literal: true
class ForceFinishLongRunningCommunityChatRecapRunsJob
include Sidekiq::Job
MAX_RUNNING_TIME_IN_HOURS = 6
def perform
CommunityChatRecapRun.running.where("created_at < ?", MAX_RUNNING_TIME_IN_HOURS.hours.ago).find_each do |recap_run|
recap_run.community_chat_recaps.status... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/cancel_subscriptions_for_product_worker.rb | app/sidekiq/cancel_subscriptions_for_product_worker.rb | # frozen_string_literal: true
class CancelSubscriptionsForProductWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(product_id)
product = Link.find(product_id)
return unless product.deleted? # user undid product deletion
product.subscriptions.active.each(&:cancel_effe... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/post_to_ping_endpoints_worker.rb | app/sidekiq/post_to_ping_endpoints_worker.rb | # frozen_string_literal: true
class PostToPingEndpointsWorker
include Sidekiq::Job
sidekiq_options retry: 20, queue: :critical
def perform(purchase_id, url_parameters, resource_name = ResourceSubscription::SALE_RESOURCE_NAME, subscription_id = nil, additional_params = {})
ActiveRecord::Base.connection.stick... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/order_review_reminder_job.rb | app/sidekiq/order_review_reminder_job.rb | # frozen_string_literal: true
class OrderReviewReminderJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform(order_id)
order = Order.find(order_id)
eligible_purchases = order.purchases.select(&:eligible_for_review_reminder?)
return if eligible_purchases.empty?
SentEmailInfo... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_wishlist_updated_emails_job.rb | app/sidekiq/send_wishlist_updated_emails_job.rb | # frozen_string_literal: true
class SendWishlistUpdatedEmailsJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low, lock: :until_executed
def perform(wishlist_id, wishlist_product_ids)
wishlist = Wishlist.find(wishlist_id)
wishlist_products = wishlist.wishlist_products.alive.where(id: wishlist_... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/transcode_video_for_streaming_worker.rb | app/sidekiq/transcode_video_for_streaming_worker.rb | # frozen_string_literal: true
class TranscodeVideoForStreamingWorker
include Sidekiq::Job
include Rails.application.routes.url_helpers
sidekiq_options retry: 13, queue: :default
# Enforced by AWS Elastic Transcoder
MAX_OUTPUT_KEY_PREFIX_BYTESIZE = 255
MEDIACONVERT = "mediaconvert"
GRMC = "grmc"
GRMC_E... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/perform_payouts_up_to_delay_days_ago_worker.rb | app/sidekiq/perform_payouts_up_to_delay_days_ago_worker.rb | # frozen_string_literal: true
class PerformPayoutsUpToDelayDaysAgoWorker
include Sidekiq::Job
sidekiq_options retry: 0, queue: :critical, lock: :until_executed
def perform(payout_processor_type, bank_account_types = nil)
payout_period_end_date = User::PayoutSchedule.next_scheduled_payout_end_date
Rails... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/large_sellers_update_user_balance_stats_cache_worker.rb | app/sidekiq/large_sellers_update_user_balance_stats_cache_worker.rb | # frozen_string_literal: true
class LargeSellersUpdateUserBalanceStatsCacheWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :low
def perform
user_ids = UserBalanceStatsService.cacheable_users.pluck(:id).map { |el| [el] }
Sidekiq::Client.push_bulk(
"class" => UpdateUserBalanceStatsCach... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/fail_abandoned_purchase_worker.rb | app/sidekiq/fail_abandoned_purchase_worker.rb | # frozen_string_literal: true
class FailAbandonedPurchaseWorker
include Sidekiq::Job, StripeErrorHandler
sidekiq_options retry: 5, queue: :default
attr_reader :purchase
def perform(purchase_id)
@purchase = Purchase.find(purchase_id)
return unless purchase.in_progress?
# Guard against the job ex... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/fight_dispute_job.rb | app/sidekiq/fight_dispute_job.rb | # frozen_string_literal: true
class FightDisputeJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default, lock: :until_executed
def perform(dispute_id)
dispute = Dispute.find(dispute_id)
dispute_evidence = dispute.dispute_evidence
return if dispute_evidence.resolved?
return if dispute_... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/export_payout_data.rb | app/sidekiq/export_payout_data.rb | # frozen_string_literal: true
class ExportPayoutData
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def initialize
@tempfiles_to_cleanup = []
end
def perform(payment_ids, recipient_user_id)
payment_ids = Array.wrap(payment_ids)
payouts = generate_payouts(payment_ids)
return if ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/pdf_unstampable_notifier_worker.rb | app/sidekiq/pdf_unstampable_notifier_worker.rb | # frozen_string_literal: true
# Before removing this file, make sure there are no more enqueued jobs in production using the class name
PdfUnstampableNotifierWorker = PdfUnstampableNotifierJob
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/retry_failed_paypal_payouts_worker.rb | app/sidekiq/retry_failed_paypal_payouts_worker.rb | # frozen_string_literal: true
class RetryFailedPaypalPayoutsWorker
include Sidekiq::Job
sidekiq_options retry: 0, queue: :critical, lock: :until_executed
def perform
payout_period_end_date = User::PayoutSchedule.manual_payout_end_date
failed_payments_users = User.joins(:payments)
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_integrations_on_tier_change_worker.rb | app/sidekiq/update_integrations_on_tier_change_worker.rb | # frozen_string_literal: true
class UpdateIntegrationsOnTierChangeWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(subscription_id)
subscription = Subscription.find(subscription_id)
[Integrations::CircleIntegrationService, Integrations::DiscordIntegrationService].each d... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/reset_admin_action_call_counts_job.rb | app/sidekiq/reset_admin_action_call_counts_job.rb | # frozen_string_literal: true
class ResetAdminActionCallCountsJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform
Rails.application.eager_load!
AdminActionCallInfo.transaction do
AdminActionCallInfo.destroy_all
Admin::BaseController.descendants.each do |controller_cla... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/trigger_community_chat_recap_run_job.rb | app/sidekiq/trigger_community_chat_recap_run_job.rb | # frozen_string_literal: true
class TriggerCommunityChatRecapRunJob
include Sidekiq::Job
sidekiq_options queue: :low, retry: 3, lock: :until_executed
def perform(recap_frequency, from_date = nil)
raise ArgumentError, "Recap frequency must be daily or weekly" unless recap_frequency.in?(CommunityChatRecapRun... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/generate_financial_reports_for_previous_month_job.rb | app/sidekiq/generate_financial_reports_for_previous_month_job.rb | # frozen_string_literal: true
class GenerateFinancialReportsForPreviousMonthJob
include Sidekiq::Worker
sidekiq_options retry: 1, queue: :default, lock: :until_executed
def perform
return unless Rails.env.production?
prev_month_date = Date.current.prev_month
CreateCanadaMonthlySalesReportJob.perfo... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_in_mongo_worker.rb | app/sidekiq/update_in_mongo_worker.rb | # frozen_string_literal: true
class UpdateInMongoWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :mongo
def perform(collection, conditions, doc)
Mongoer.safe_update(collection, conditions, doc)
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/create_stripe_merchant_account_worker.rb | app/sidekiq/create_stripe_merchant_account_worker.rb | # frozen_string_literal: true
class CreateStripeMerchantAccountWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(user_id)
user = User.find(user_id)
StripeMerchantAccountManager.create_account(user, passphrase: GlobalConfig.get("STRONGBOX_GENERAL_PASSWORD"))
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/process_early_fraud_warning_job.rb | app/sidekiq/process_early_fraud_warning_job.rb | # frozen_string_literal: true
class ProcessEarlyFraudWarningJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default, lock: :until_executed
def perform(early_fraud_warning_id)
early_fraud_warning = EarlyFraudWarning.find(early_fraud_warning_id)
return if early_fraud_warning.resolved?
earl... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_post_blast_emails_job.rb | app/sidekiq/send_post_blast_emails_job.rb | # frozen_string_literal: true
class SendPostBlastEmailsJob
include Sidekiq::Job
include ActionView::Helpers::SanitizeHelper
sidekiq_options retry: 10, queue: :default, lock: :until_executed
def perform(blast_id)
@blast = PostEmailBlast.find(blast_id)
@post = @blast.post
Rails.logger.info("[#{self.... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/handle_payout_reversed_worker.rb | app/sidekiq/handle_payout_reversed_worker.rb | # frozen_string_literal: true
class HandlePayoutReversedWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(payment_id, reversing_payout_id, stripe_connect_account_id)
@reversing_payout_id = reversing_payout_id
@stripe_connect_account_id = stripe_connect_account_id
if ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/refresh_sitemap_daily_worker.rb | app/sidekiq/refresh_sitemap_daily_worker.rb | # frozen_string_literal: true
class RefreshSitemapDailyWorker
include Sidekiq::Job
sidekiq_options retry: 0, queue: :low
def perform(date = Date.current.to_s)
SitemapService.new.generate(date)
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/create_licenses_for_existing_customers_worker.rb | app/sidekiq/create_licenses_for_existing_customers_worker.rb | # frozen_string_literal: true
class CreateLicensesForExistingCustomersWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(product_id)
product = Link.find(product_id)
product.sales.successful_gift_or_nongift.not_is_gift_sender_purchase.not_recurring_charge.find_each do |pur... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/create_canada_monthly_sales_report_job.rb | app/sidekiq/create_canada_monthly_sales_report_job.rb | # frozen_string_literal: true
class CreateCanadaMonthlySalesReportJob
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed, on_conflict: :replace
def perform(month, year)
raise ArgumentError, "Invalid month" unless month.in?(1..12)
raise ArgumentError, "Invalid year" unl... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/compile_gumroad_daily_analytics_job.rb | app/sidekiq/compile_gumroad_daily_analytics_job.rb | # frozen_string_literal: true
class CompileGumroadDailyAnalyticsJob
include Sidekiq::Job
sidekiq_options retry: 0, queue: :default
REFRESH_PERIOD = 45.days
private_constant :REFRESH_PERIOD
def perform
start_date = Date.today - REFRESH_PERIOD
end_date = Date.today
(start_date..end_date).each do... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/email_outstanding_balances_csv_worker.rb | app/sidekiq/email_outstanding_balances_csv_worker.rb | # frozen_string_literal: true
class EmailOutstandingBalancesCsvWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed, on_conflict: :raise
def perform
return unless Rails.env.production?
AccountingMailer.email_outstanding_balances_csv.deliver_now
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/unblock_object_worker.rb | app/sidekiq/unblock_object_worker.rb | # frozen_string_literal: true
class UnblockObjectWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(object_value)
BlockedObject.unblock!(object_value)
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_workflow_post_emails_job.rb | app/sidekiq/send_workflow_post_emails_job.rb | # frozen_string_literal: true
class SendWorkflowPostEmailsJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform(post_id, earliest_valid_time = nil)
@post = Installment.find(post_id)
@workflow = @post.workflow
return unless @workflow.alive? && @post.alive? && @post.published?
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/regenerate_creator_analytics_cache_worker.rb | app/sidekiq/regenerate_creator_analytics_cache_worker.rb | # frozen_string_literal: true
class RegenerateCreatorAnalyticsCacheWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :low, lock: :until_executed
def perform(user_id, date_string)
user = User.find(user_id)
date = Date.parse(date_string)
service = CreatorAnalytics::CachingProxy.new(user)
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/expire_transcoded_videos_job.rb | app/sidekiq/expire_transcoded_videos_job.rb | # frozen_string_literal: true
class ExpireTranscodedVideosJob
include Sidekiq::Job
sidekiq_options queue: :low, retry: 5
BATCH_SIZE = 100
def perform
recentness_limit = $redis.get(RedisKey.transcoded_videos_recentness_limit_in_months)
recentness_limit ||= 12 * 100 # 100 years => do not expire by defa... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/duplicate_product_worker.rb | app/sidekiq/duplicate_product_worker.rb | # frozen_string_literal: true
class DuplicateProductWorker
include Sidekiq::Job
sidekiq_options queue: :critical
def perform(product_id)
ProductDuplicatorService.new(product_id).duplicate
rescue => e
logger.error("Error while duplicating product id '#{product_id}': #{e.inspect}")
Bugsnag.notify(e)... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_payout_status_worker.rb | app/sidekiq/update_payout_status_worker.rb | # frozen_string_literal: true
class UpdatePayoutStatusWorker
include Sidekiq::Job
sidekiq_options retry: 25, queue: :default, lock: :until_executed
def perform(payment_id)
payment = Payment.find(payment_id)
Rails.logger.info("UpdatePayoutStatusWorker invoked for payment #{payment_id}")
# This job ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_product_files_archive_worker.rb | app/sidekiq/update_product_files_archive_worker.rb | # frozen_string_literal: true
class UpdateProductFilesArchiveWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
PRODUCT_FILES_ARCHIVE_FILE_SIZE_LIMIT = 500.megabytes
UNTITLED_FILENAME = "Untitled"
# On an EXT4 file system, the command "getconf PATH_MAX /" returns 255 which
# is an indicati... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_purchasing_power_parity_factors_worker.rb | app/sidekiq/update_purchasing_power_parity_factors_worker.rb | # frozen_string_literal: true
class UpdatePurchasingPowerParityFactorsWorker
include Sidekiq::Job
include CurrencyHelper
API_URL = "https://api.worldbank.org/v2/en/indicator/PA.NUS.PPP?downloadformat=csv"
API_FILE_PREFIX = "API_PA"
UPPER_THRESHOLD = 0.8
LOWER_THRESHOLD = 0.4
sidekiq_options retry: 5, q... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/create_stripe_apple_pay_domain_worker.rb | app/sidekiq/create_stripe_apple_pay_domain_worker.rb | # frozen_string_literal: true
class CreateStripeApplePayDomainWorker
include Sidekiq::Job
sidekiq_options retry: 3, queue: :low
def perform(user_id, domain = nil)
return if Rails.env.test?
user = User.find(user_id)
domain ||= Subdomain.from_username(user.username)
if domain && StripeApplePayDo... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/mass_refund_for_fraud_job.rb | app/sidekiq/mass_refund_for_fraud_job.rb | # frozen_string_literal: true
class MassRefundForFraudJob
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed
def perform(product_id, external_ids, admin_user_id)
results = { success: 0, failed: 0, errors: {} }
external_ids.each do |external_id|
purchase = Purcha... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/handle_sns_aws_config_event_worker.rb | app/sidekiq/handle_sns_aws_config_event_worker.rb | # frozen_string_literal: true
class HandleSnsAwsConfigEventWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :mongo
MESSAGE_TYPES_TO_IGNORE = %w[
ConfigurationSnapshotDeliveryStarted
ConfigurationSnapshotDeliveryCompleted
ConfigurationHistoryDeliveryCompleted
].freeze
private_constant... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/review_reminder_job.rb | app/sidekiq/review_reminder_job.rb | # frozen_string_literal: true
class ReviewReminderJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform(purchase_id)
purchase = Purchase.find(purchase_id)
return unless purchase.eligible_for_review_reminder?
SentEmailInfo.ensure_mailer_uniqueness("CustomerLowPriorityMailer", "r... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/create_us_states_sales_summary_report_job.rb | app/sidekiq/create_us_states_sales_summary_report_job.rb | # frozen_string_literal: true
class CreateUsStatesSalesSummaryReportJob
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed
attr_reader :taxjar_api
def perform(subdivision_codes, month, year, push_to_taxjar: true)
raise ArgumentError, "Invalid month" unless month.in?(1..... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_utm_link_stats_job.rb | app/sidekiq/update_utm_link_stats_job.rb | # frozen_string_literal: true
class UpdateUtmLinkStatsJob
include Sidekiq::Job
sidekiq_options queue: :low, lock: :until_executed, retry: 1
def perform(utm_link_id)
utm_link = UtmLink.find(utm_link_id)
utm_link.update!(
total_clicks: utm_link.utm_link_visits.count,
unique_clicks: utm_link.... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/suspend_accounts_with_payment_address_worker.rb | app/sidekiq/suspend_accounts_with_payment_address_worker.rb | # frozen_string_literal: true
class SuspendAccountsWithPaymentAddressWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(user_id)
suspended_user = User.find(user_id)
return if suspended_user.payment_address.blank?
User.where(payment_address: suspended_user.payment_add... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/handle_resend_event_job.rb | app/sidekiq/handle_resend_event_job.rb | # frozen_string_literal: true
class HandleResendEventJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform(event_json)
resend_event_info = ResendEventInfo.new(event_json)
return if resend_event_info.invalid?
HandleEmailEventInfo.perform(resend_event_info)
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/unsubscribe_and_fail_worker.rb | app/sidekiq/unsubscribe_and_fail_worker.rb | # frozen_string_literal: true
class UnsubscribeAndFailWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(subscription_id)
subscription = Subscription.find(subscription_id)
return if !subscription.alive?(include_pending_cancellation: false) ||
subscription.is_... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/sync_stuck_payouts_job.rb | app/sidekiq/sync_stuck_payouts_job.rb | # frozen_string_literal: true
class SyncStuckPayoutsJob
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed
def perform(processor)
Payment.where(processor:, state: %w(creating processing unclaimed)).find_each do |payment|
Rails.logger.info("Syncing payout #{payment.id... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/reindex_user_elasticsearch_data_worker.rb | app/sidekiq/reindex_user_elasticsearch_data_worker.rb | # frozen_string_literal: true
class ReindexUserElasticsearchDataWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :low, lock: :until_executed
ADMIN_NOTE = "Refreshed ES Data"
def perform(user_id, admin_id)
user = User.find user_id
admin = User.find admin_id
DevTools.reindex_all_for_us... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/process_payment_worker.rb | app/sidekiq/process_payment_worker.rb | # frozen_string_literal: true
class ProcessPaymentWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low, lock: :until_executed
def perform(payment_id)
payment = Payment.find(payment_id)
return unless payment.processing?
PayoutProcessorType.get(payment.processor).process_payments([payme... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/custom_domain_verification_worker.rb | app/sidekiq/custom_domain_verification_worker.rb | # frozen_string_literal: true
class CustomDomainVerificationWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform(custom_domain_id)
custom_domain = CustomDomain.find(custom_domain_id)
return if custom_domain.deleted?
return unless custom_domain.valid?
custom_domain.veri... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/suspend_users_worker.rb | app/sidekiq/suspend_users_worker.rb | # frozen_string_literal: true
class SuspendUsersWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(author_id, user_ids, reason, additional_notes)
User.where(id: user_ids).or(User.where(external_id: user_ids)).find_each(batch_size: 100) do |user|
user.flag_for_tos_violati... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/reindex_recommendable_products_worker.rb | app/sidekiq/reindex_recommendable_products_worker.rb | # frozen_string_literal: true
class ReindexRecommendableProductsWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default
SCROLL_SIZE = 1000
SCROLL_SORT = ["_doc"]
def perform
response = EsClient.search(
index: Link.index_name,
scroll: "1m",
body: { query: { term: { is_rec... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/million_dollar_milestone_check_worker.rb | app/sidekiq/million_dollar_milestone_check_worker.rb | # frozen_string_literal: true
class MillionDollarMilestoneCheckWorker
include Sidekiq::Job
include Rails.application.routes.url_helpers
MILLION_DOLLARS_IN_CENTS = 1_000_000_00
sidekiq_options retry: 5, queue: :low
def perform
purchase_creation_time_range = Range.new(3.weeks.ago.days_ago(2), 2.weeks.ag... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_year_in_review_email_job.rb | app/sidekiq/send_year_in_review_email_job.rb | # frozen_string_literal: true
class SendYearInReviewEmailJob
include Sidekiq::Job
sidekiq_options retry: 5, queue: :low
def perform(seller_id, year, recipient = nil)
analytics_data = {}
seller = User.find(seller_id)
range = Date.new(year).all_year
payout_csv_url = seller.financial_annual_report_... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/send_finances_report_worker.rb | app/sidekiq/send_finances_report_worker.rb | # frozen_string_literal: true
class SendFinancesReportWorker
include Sidekiq::Job
sidekiq_options retry: 1, queue: :default, lock: :until_executed, on_conflict: :replace
def perform
return unless Rails.env.production?
last_month = Time.current.last_month
AccountingMailer.funds_received_report(last... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/cancel_preorder_worker.rb | app/sidekiq/cancel_preorder_worker.rb | # frozen_string_literal: true
class CancelPreorderWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :default
def perform(preorder_id)
preorder = Preorder.find_by(id: preorder_id)
return unless preorder.is_authorization_successful?
preorder.mark_cancelled!(auto_cancelled: true)
end
end
| ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/refresh_sitemap_monthly_worker.rb | app/sidekiq/refresh_sitemap_monthly_worker.rb | # frozen_string_literal: true
class RefreshSitemapMonthlyWorker
include Sidekiq::Job
sidekiq_options retry: 0, queue: :low
def perform
# Update sitemap of products updated in the last month
last_month_start = 1.month.ago.beginning_of_month
last_month_end = last_month_start.end_of_month
updated_... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_bundle_purchases_content_job.rb | app/sidekiq/update_bundle_purchases_content_job.rb | # frozen_string_literal: true
class UpdateBundlePurchasesContentJob
include Sidekiq::Job
sidekiq_options retry: 3, queue: :low
def perform(bundle_id)
bundle = Link.is_bundle.find(bundle_id)
return if !bundle.has_outdated_purchases?
bundle.update!(has_outdated_purchases: false)
content_updated_... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/push_notification_worker.rb | app/sidekiq/push_notification_worker.rb | # frozen_string_literal: true
class PushNotificationWorker
include Sidekiq::Job
sidekiq_options retry: 5, queue: :critical
def perform(receiver_id, app_type, title, body = nil, data = {}, sound = nil)
receiver = User.find receiver_id
receiver.devices.where(app_type:).each do |device|
case device.... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_currencies_worker.rb | app/sidekiq/update_currencies_worker.rb | # frozen_string_literal: true
class UpdateCurrenciesWorker
include Sidekiq::Job
include CurrencyHelper
sidekiq_options retry: 5, queue: :default
def perform
rates = JSON.parse(URI.open(CURRENCY_SOURCE).read)["rates"]
rates.each do |currency, rate|
currency_namespace.set(currency.to_s, rate)
... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/post_to_individual_ping_endpoint_worker.rb | app/sidekiq/post_to_individual_ping_endpoint_worker.rb | # frozen_string_literal: true
class PostToIndividualPingEndpointWorker
include Sidekiq::Job
sidekiq_options retry: 0, queue: :critical
ERROR_CODES_TO_RETRY = [499, 500, 502, 503, 504].freeze
BACKOFF_STRATEGY = [60, 180, 600, 3600].freeze
NOTIFICATION_THROTTLE_PERIOD = 1.week.freeze
def perform(post_url, ... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
antiwork/gumroad | https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/app/sidekiq/update_cached_sales_related_products_infos_job.rb | app/sidekiq/update_cached_sales_related_products_infos_job.rb | # frozen_string_literal: true
class UpdateCachedSalesRelatedProductsInfosJob
include Sidekiq::Job
sidekiq_options retry: 3, queue: :low, lock: :until_executed
# We don't need to store the fact that a (popular) product is related to 100k other ones,
# especially when many of these have been only purchased a sm... | ruby | MIT | 638f6c3a40b23b907c09f6881d4df18339da069c | 2026-01-04T15:39:11.815677Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.