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
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/user_deleter.rb
app/jobs/user_deleter.rb
class UserDeleter include Sidekiq::Worker sidekiq_options queue: :default_critical def perform(user_id, signed_id = nil) @user = User.find(user_id) email_subscriptions refund_payment(signed_id) @user.destroy end def refund_payment(signed_id) begin id = Rails.application.message_ver...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/newsletter_updater.rb
app/jobs/newsletter_updater.rb
class NewsletterUpdater include Sidekiq::Worker sidekiq_options queue: :utility TOKEN_REGEX = / < (?<token>[^@<>]+) @ ((?:feedb\.in|newsletters\.feedbin\.com)) > /x def perform(feed_id) entries = Entry.where(feed_id: feed_id).where("created_at > ?", Time.parse("2021-06-01")) entr...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/share_retry.rb
app/jobs/share_retry.rb
class ShareRetry include Sidekiq::Worker def perform(service_id, params) sharing_service = SupportedSharingService.find(service_id) params = ActiveSupport::HashWithIndifferentAccess.new(params) result = sharing_service.service.add(params) raise "ShareRetry failed" if result != 200 rescue ActiveRe...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/view_link_cache.rb
app/jobs/view_link_cache.rb
class ViewLinkCache include Sidekiq::Worker sidekiq_options queue: :network_default, retry: false def perform(url, expires_at = nil) MercuryParser.parse(url).content unless Expires.expired?(expires_at) rescue HTTP::TimeoutError, HTTP::ConnectionError true end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/podcast_clear_unused.rb
app/jobs/podcast_clear_unused.rb
class PodcastClearUnused include Sidekiq::Worker def perform PodcastSubscription.hidden.where("created_at < ?", 1.month.ago).find_each do |subscription| subscription.destroy unless subscription.queued_entries.exists? end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/send_stats.rb
app/jobs/send_stats.rb
class SendStats include Sidekiq::Worker sidekiq_options queue: :default_critical, retry: false MEGABYTE = 1024.0 * 1024.0 def perform if ENV["LIBRATO_TOKEN"] redis_stats postgres_stats plan_count active_users_count queue_depth clear_empty_jobs sidekiq_queue_depth ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/make_epub.rb
app/jobs/make_epub.rb
class MakeEpub include Sidekiq::Worker def perform(entry_id, user_id, address, extract = false) @entry = Entry.find(entry_id) @user = User.find(user_id) @address = address @extract = extract build end def build @subscription = @user.subscriptions.where(feed: @entry.feed).take @feed...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_status.rb
app/jobs/feed_status.rb
class FeedStatus include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :utility def perform(feed_id = nil, schedule = false) if schedule build else update(feed_id) end end def update(feed_id) feed = Feed.find(feed_id) cache = FeedbinUtils.shared_cache(feed.re...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/harvest_links.rb
app/jobs/harvest_links.rb
class HarvestLinks include Sidekiq::Worker sidekiq_options retry: false, queue: :network_default def perform(entry_id) @entry = Entry.find(entry_id) urls = if @entry.tweet? find_tweet_urls elsif @entry.micropost? find_micropost_urls end if url = urls&.first page = MercuryP...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/cancel_billing.rb
app/jobs/cancel_billing.rb
class CancelBilling include Sidekiq::Worker def perform(customer_id) ErrorService.context(customer_id: customer_id) customer = Stripe::Customer.retrieve(customer_id) customer.delete end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/entry_deleter_scheduler.rb
app/jobs/entry_deleter_scheduler.rb
class EntryDeleterScheduler include Sidekiq::Worker include SidekiqHelper def perform return unless queue_empty?(Search::SearchServerSetup.get_sidekiq_options["queue"]) Feed.select(:id).find_in_batches(batch_size: 10_000) do |feeds| Sidekiq::Client.push_bulk( "args" => feeds.map { |feed| f...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/newsletter_receiver.rb
app/jobs/newsletter_receiver.rb
class NewsletterReceiver attr_reader :newsletter, :user include Sidekiq::Worker sidekiq_options queue: :parse def perform(address, url) @address = Mail::Address.new(address) @url = Addressable::URI.parse(url) @user = original_authentication_token&.user Sidekiq.logger.info "Newsletter processin...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/queued_entry_limiter.rb
app/jobs/queued_entry_limiter.rb
class QueuedEntryLimiter include Sidekiq::Worker def perform(user_id) user = User.find(user_id) limit = user.podcast_download_limit queued_entries = user.queued_entries.group_by(&:feed_id).transform_values do |entries| entries.map(&:entry_id) end queued_entries.each do |feed_id, entry_i...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/update_default_column.rb
app/jobs/update_default_column.rb
class UpdateDefaultColumn include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :utility def perform(options = {}) @klass = options.fetch("klass").constantize @column = options.fetch("column") @default = options.fetch("default") if options["schedule"] schedule else ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_replacer.rb
app/jobs/feed_replacer.rb
class FeedReplacer include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :default_critical def perform(user_id, subscription_id, discovered_feed_id = nil) user = User.find(user_id) subscription = user.subscriptions.find(subscription_id) discovered_feed = if discovered_feed_id ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/backfill_guid.rb
app/jobs/backfill_guid.rb
class BackfillGuid include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :utility def perform(feed_id) @feed = Feed.find(feed_id) Entry.where(feed: @feed).find_in_batches(batch_size: 500) do |entries| data = entries.each_with_object({}) do |entry, hash| hash[entry.id] = gui...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/cache_entry_views.rb
app/jobs/cache_entry_views.rb
class CacheEntryViews include Sidekiq::Worker include SidekiqHelper SET_NAME = "#{name}-ids" def perform(entry_id, process = false) if process cache_views else add_to_queue(SET_NAME, entry_id) end end def cache_views entry_ids = dequeue_ids(SET_NAME) entries = Entry.where(...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/podcast_push_notification.rb
app/jobs/podcast_push_notification.rb
class PodcastPushNotification include Sidekiq::Worker def perform(user_id, entry_id) ErrorService.context(user_id: user_id, entry_id: entry_id) entry = Entry.find(entry_id) tokens = Device.where(user_id: user_id, active: true).podcast.pluck(:token) tokens.each do |token| notification = build_...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/update_redirect.rb
app/jobs/update_redirect.rb
class UpdateRedirect include Sidekiq::Worker def perform(feed_id, to) feed = Feed.find(feed_id) feed.update(redirected_to: to, current_feed_url: to) end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/chapter_parser.rb
app/jobs/chapter_parser.rb
class ChapterParser include Sidekiq::Worker sidekiq_options queue: :network_default, retry: false MAX_SIZE = 5.megabytes def perform(entry_id) @entry = Entry.find(entry_id) @url = @entry.data.safe_dig("enclosure_url") @url = @entry.rebase_url(@url) return if @url.nil? chapters = Rails.ca...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/entry_deleter.rb
app/jobs/entry_deleter.rb
class EntryDeleter include Sidekiq::Worker sidekiq_options queue: :utility def perform(feed_id) feed = Feed.find(feed_id) entry_limit = if ENV["ENTRY_LIMIT"] ENV["ENTRY_LIMIT"].to_i else feed.subscriptions.where(active: true).exists? ? 400 : 10 end feed.feed_stats.where("day < ?...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/newsletter_saver.rb
app/jobs/newsletter_saver.rb
class NewsletterSaver include Sidekiq::Worker sidekiq_options queue: :default_critical def perform(entry_id) entry = Entry.find(entry_id) document = build_document(entry) content = ActiveSupport::Gzip.compress(document.to_html) response = Fog::Storage.new(STORAGE).put_object(ENV["AWS_S3_BUCKET_NE...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/device_push_notification_send.rb
app/jobs/device_push_notification_send.rb
class DevicePushNotificationSend include Sidekiq::Worker sidekiq_options retry: false, queue: :default_critical MAX_PAYLOAD_SIZE = 4096 apnotic_options = { auth_method: :token, cert_path: ENV["APPLE_AUTH_KEY"], team_id: ENV["APPLE_TEAM_ID"], key_id: ENV["APPLE_KEY_ID"] } APNOTIC_POOL = Apn...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_saver.rb
app/jobs/image_saver.rb
class ImageSaver include Sidekiq::Worker sidekiq_options retry: false attr_reader :entry def perform(entry_id) @entry = Entry.find(entry_id) Nokogiri::HTML5(content).css("img").each do |image| src = image["src"] next unless src.start_with?("http") file = Download.new(src) unles...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/save_twitter_users.rb
app/jobs/save_twitter_users.rb
class SaveTwitterUsers include Sidekiq::Worker def perform(entry_id) entry = Entry.find(entry_id) [].tap do |array| array.push(entry.tweet.main_tweet) array.push(entry.tweet.main_tweet.quoted_status) if entry.tweet.main_tweet.quoted_status? end.each do |tweet| twitter_user = TwitterUs...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/onboarding_message.rb
app/jobs/onboarding_message.rb
class OnboardingMessage include Sidekiq::Worker sidekiq_options queue: :default_critical def perform(user_id, message) @user = User.find(user_id) @message = message.to_sym send(@message) rescue ActiveRecord::RecordNotFound end private def onboarding_1_welcome if @user.trialing? && @user...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/update_statement_descriptor.rb
app/jobs/update_statement_descriptor.rb
class UpdateStatementDescriptor include Sidekiq::Worker sidekiq_options queue: :default_critical def perform(billing_event_id) billing_event = BillingEvent.find(billing_event_id) return unless billing_event.event_type == "invoice.created" descriptor = [ENV.fetch("STRIPE_DESCRIPTOR"), billing_event.bi...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/web_push_notification_send.rb
app/jobs/web_push_notification_send.rb
class WebPushNotificationSend include Sidekiq::Worker sidekiq_options retry: false, queue: :default_critical VERIFIER = ActiveSupport::MessageVerifier.new(Rails.application.secret_key_base) apnotic_options = { auth_method: :token, cert_path: ENV["APPLE_AUTH_KEY"], team_id: ENV["APPLE_TEAM_ID"], ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/harvest_embeds.rb
app/jobs/harvest_embeds.rb
class HarvestEmbeds include Sidekiq::Worker include SidekiqHelper sidekiq_options retry: false SET_NAME = "#{name}-ids" def perform(entry_id, process = false) if entry_id find_embeds(entry_id) end if process cache_embeds end end def find_embeds(entry_id) entry = Entry.fi...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_import_fixer.rb
app/jobs/feed_import_fixer.rb
class FeedImportFixer include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :default_critical def perform(user_id, import_item_id, discovered_feed_id = nil) user = User.find(user_id) import_item = user.import_items.find(import_item_id) discovered_feed = if discovered_feed_id D...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_update.rb
app/jobs/feed_update.rb
class FeedUpdate include Sidekiq::Worker sidekiq_options queue: :utility def perform(feed_id) feed = Feed.find(feed_id) parsed_url = Feedkit::BasicAuth.parse(feed.feed_url) url = feed.current_feed_url ? feed.current_feed_url : parsed_url.url response = Feedkit::Request.download(url, usernam...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/save_page.rb
app/jobs/save_page.rb
class SavePage class MissingPage < StandardError attr_reader :entry def initialize(message, entry) @entry = entry super(message) end end include Sidekiq::Worker sidekiq_options queue: :default_critical attr_reader :user, :url, :title, :path def perform(user_id, url, title, path = ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/backfill_provider_ids.rb
app/jobs/backfill_provider_ids.rb
class BackfillProviderIds include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :utility def perform(batch) ids = build_ids(batch) entries = Entry.where(id: ids).select(:id, :data, :main_tweet_id, :image) provider_parent_id_data = {} provider_id_data = {} provider_data = {} ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_importer.rb
app/jobs/feed_importer.rb
class FeedImporter include Sidekiq::Worker sidekiq_options queue: :default_critical, retry: false def perform(import_item_id) @import_item = ImportItem.find(import_item_id) import = @import_item.import user = import.user feeds = begin FeedFinder.feeds(@import_item.details[:xml_url], import...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/view_link_cache_multiple.rb
app/jobs/view_link_cache_multiple.rb
class ViewLinkCacheMultiple include Sidekiq::Worker sidekiq_options retry: false def perform(user_id, entry_ids) user = User.find(user_id) unread_ids = user.unread_entries.where(entry_id: entry_ids).pluck(:entry_id) entries = Entry.select(:id, :feed_id, :url).where(id: unread_ids).includes(:feed) ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/unread_limiter.rb
app/jobs/unread_limiter.rb
class UnreadLimiter include Sidekiq::Worker def perform(feed_id) entry_limit = if ENV["ENTRY_LIMIT"] ENV["ENTRY_LIMIT"].to_i else 400 end subscriptions = Subscription.where(feed_id: feed_id).where(active: true) subscriptions.each do |subscription| next if subscription.protect...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/trial_expiration.rb
app/jobs/trial_expiration.rb
class TrialExpiration include Sidekiq::Worker sidekiq_options queue: :default_critical def perform expire_plan("trial") expire_prepaid_users end def expire_prepaid_users user_ids = expire_plan("timed") user_ids.each do |user_id| UserMailer.timed_plan_expiration(user_id).deliver_later ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_fixer.rb
app/jobs/feed_fixer.rb
class FeedFixer include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :utility def perform(feed_id, force = false) @feed = Feed.find(feed_id) return unless @feed.fixable_error? if !force && recent_discovery_exists? Sidekiq.logger.info "Skipping discovery, already checked rece...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/trial_send_expiration.rb
app/jobs/trial_send_expiration.rb
class TrialSendExpiration include Sidekiq::Worker sidekiq_options queue: :default_critical def perform(user_id) user = User.find(user_id) if user.plan.stripe_id == "trial" && user.subscriptions.exists? UserMailer.trial_expiration(user_id).deliver end rescue ActiveRecord::RecordNotFound end ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/starred_entries_export.rb
app/jobs/starred_entries_export.rb
class StarredEntriesExport include Sidekiq::Worker def perform(user_id) user = User.find(user_id) file = Tempfile.new(["starred_", ".json"]) build_file(user, file) upload_url = upload_file(file) UserMailer.starred_export_download(user_id, upload_url).deliver_now ensure file.close file...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/app_store_notification_processor.rb
app/jobs/app_store_notification_processor.rb
class AppStoreNotificationProcessor include Sidekiq::Worker sidekiq_options queue: :default_critical PRODUCTS = { "yearly_v1" => "app-subscription", "yearly_pro_v1" => "app-subscription", "monthly_pro_v1" => "app-subscription", "yearly_podcast_v1" => "podcast-subscription", "ye...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/save_page_from_extension.rb
app/jobs/save_page_from_extension.rb
class SavePageFromExtension include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: local_queue("parse_critical"), retry: false def perform(user_id, url, title, path) Sidekiq.logger.info "Saving page path=#{path}" SavePage.new.perform(user_id, url, title, path) # File.unlink(path) resc...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_deleter.rb
app/jobs/image_deleter.rb
class ImageDeleter include Sidekiq::Worker BUCKET = ENV["AWS_S3_BUCKET_IMAGES"] || ENV["AWS_S3_BUCKET"] def perform(image_urls) client = Fog::Storage.new(STORAGE) paths = extract_paths(image_urls) paths.each_slice(999) do |slice| client.delete_multiple_objects(BUCKET, slice, {quiet: true}) ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/touch_feeds.rb
app/jobs/touch_feeds.rb
class TouchFeeds include Sidekiq::Worker def perform(host) Feed.where(host: host).select(:id).find_in_batches do |feeds| Feed.where(id: feeds.map(&:id)).update_all(updated_at: Time.now) end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/account_migrator/setup.rb
app/jobs/account_migrator/setup.rb
module AccountMigrator class Setup include Sidekiq::Worker sidekiq_options queue: :utility_critical def perform(migration_id) @migration = AccountMigration.find(migration_id) client = ApiClient.new(@migration.api_token) streams = client.streams_list @migration.update(fw_streams: s...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/account_migrator/import_feed.rb
app/jobs/account_migrator/import_feed.rb
module AccountMigrator class ImportFeed include Sidekiq::Worker sidekiq_options queue: :network_search def perform(item_id) @item = AccountMigrationItem.find(item_id) @migration = @item.account_migration @user = @migration.user @client = ApiClient.new(@migration.api_token) ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/cache_remote_file.rb
app/jobs/image_crawler/cache_remote_file.rb
module ImageCrawler class CacheRemoteFile include Sidekiq::Worker sidekiq_options retry: false def self.schedule(url) fingerprint = RemoteFile.fingerprint(url) image = Image.new_with_attributes( id: "#{fingerprint}-icon", preset_name: "icon", image_urls: [url], ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/itunes_image.rb
app/jobs/image_crawler/itunes_image.rb
module ImageCrawler class ItunesImage include Sidekiq::Worker sidekiq_options retry: false def perform(public_id, image = nil) if ENV["SKIP_IMAGES"].present? Rails.logger.info("SKIP_IMAGES is present, no images will be processed") return end public_id = public_id.split(...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/fix_image.rb
app/jobs/image_crawler/fix_image.rb
module ImageCrawler class FixImage include Sidekiq::Worker sidekiq_options retry: false, queue: :utility POOL = ConnectionPool.new(size: 10) { HTTP.persistent("https://#{ImageCrawler::Image::BUCKET}.s3.amazonaws.com") } def perform(entry_id) entry = Entry.find(entry_id) process...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/twitter_link_image.rb
app/jobs/image_crawler/twitter_link_image.rb
module ImageCrawler class TwitterLinkImage include Sidekiq::Worker sidekiq_options retry: false def perform(public_id, image = nil, page_url = nil) public_id = public_id.split("-").first @entry = Entry.find_by_public_id(public_id) @image = image @page_url = page_url if @ima...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/entry_image.rb
app/jobs/image_crawler/entry_image.rb
module ImageCrawler class EntryImage include Sidekiq::Worker sidekiq_options retry: false IMAGE_SELECTORS = %w[ meta[property="twitter:image"] meta[property="og:image"] img iframe video ] def perform(public_id, image = nil) if ENV["SKIP_IMAGES"].present? Rails.log...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/itunes_feed_image.rb
app/jobs/image_crawler/itunes_feed_image.rb
module ImageCrawler class ItunesFeedImage include Sidekiq::Worker sidekiq_options retry: false def perform(feed_id, image = nil) feed_id = feed_id.to_s.split("-").first @feed = Feed.find(feed_id) @image = image if @image receive else schedule end r...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/download.rb
app/jobs/image_crawler/lib/download.rb
module ImageCrawler class Download attr_reader :path def initialize(url, camo: false, minimum_size: 20_000) @url = url @valid = false @minimum_size = minimum_size @camo = camo end def self.download!(url, **args) klass = find_download_provider(url) || Download::Default ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/meta_images.rb
app/jobs/image_crawler/lib/meta_images.rb
module ImageCrawler class MetaImages def initialize(url) @url = url end def self.find_urls(url) new(url).find_urls rescue Addressable::URI::InvalidURIError [] end def find_urls if cache.urls cache.urls elsif needs_download? download end ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/meta_images_cache.rb
app/jobs/image_crawler/lib/meta_images_cache.rb
module ImageCrawler class MetaImagesCache def initialize(url) @url = url end def urls url_cache[:urls] end def checked? !!url_cache[:checked] end def has_meta!(result) @host_cache = {has_meta: result} Cache.write(host_cache_key, @host_cache, options: {expir...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/timer.rb
app/jobs/image_crawler/lib/timer.rb
module ImageCrawler class Timer def initialize(timeout = 0) start @deadline = now + timeout.to_f end def expired? now > @deadline end def now ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) end def elapsed (now - start).ceil(2) end def start ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/image.rb
app/jobs/image_crawler/lib/image.rb
module ImageCrawler class Image ATTRIBUTES = %i[ camo download_path entry_url final_url height width id image_urls original_extension original_url placeholder_color preset_name processed_extension processed_path storage_url ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/cache.rb
app/jobs/image_crawler/lib/cache.rb
module ImageCrawler class Cache def self.read(*args) new.read(*args) end def self.delete(*args) new.delete(*args) end def self.increment(key, **args) new.increment(key, **args) end def self.count(*args) new.count(*args) end def self.write(key, value, **a...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/download_cache.rb
app/jobs/image_crawler/lib/download_cache.rb
module ImageCrawler class DownloadCache attr_reader :storage_url, :cached_image def initialize(url, image) @url = url @image = image @cached_image = from_cache end def from_cache data = Cache.read(cache_key) data.present? ? Image.new(data) : nil end def self.c...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/processor/cropper.rb
app/jobs/image_crawler/lib/processor/cropper.rb
module ImageCrawler module Processor class Cropper CASCADE = Rails.root.join("lib/cascade/facefinder") PIGO = ENV["PIGO_PATH"] || `which pigo`.chomp PIGO_INSTALLED = File.executable?(PIGO) puts "Pigo missing. Add it to your path or set ENV['PIGO_PATH']. From https://github.com/esimov/pigo"...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/processor/processed.rb
app/jobs/image_crawler/lib/processor/processed.rb
module ImageCrawler module Processor class Processed attr_reader :file, :extension def self.from_pipeline(pipeline) extension = pipeline.options[:format] path = persisted_path(extension) pipeline.call(destination: path) new(path, extension) end def self.f...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/download/vimeo.rb
app/jobs/image_crawler/lib/download/vimeo.rb
module ImageCrawler class Download::Vimeo < Download def self.supported_urls [ %r{.*?//vimeo\.com/video/(.*?)(#|\?|$)}, %r{.*?//vimeo\.com/(.*?)(#|\?|$)}, %r{.*?//player\.vimeo\.com/video/(.*?)(#|\?|$)} ] end def download download_file(image_url) rescue Down:...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/download/default.rb
app/jobs/image_crawler/lib/download/default.rb
module ImageCrawler class Download::Default < Download def self.recognize_url?(*args) true end def download download_file(image_url) rescue Down::Error => exception end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/download/youtube.rb
app/jobs/image_crawler/lib/download/youtube.rb
module ImageCrawler class Download::Youtube < Download attr_reader :image_url def self.supported_urls Feedbin::Application.config.youtube_embed_urls end def download ["maxresdefault", "hqdefault"].each do |option| @image_url = "https://i.ytimg.com/vi/#{provider_identifier}/#{opti...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/lib/download/instagram.rb
app/jobs/image_crawler/lib/download/instagram.rb
module ImageCrawler class Download::Instagram < Download def self.supported_urls [ %r{.*?//www\.instagram\.com/p/(.*?)(/|#|\?|$)}, %r{.*?//instagram\.com/p/(.*?)(/|#|\?|$)} ] end def download download_file(image_url) rescue Down::Error => exception end def i...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/pipeline/find.rb
app/jobs/image_crawler/pipeline/find.rb
module ImageCrawler module Pipeline class Find include Sidekiq::Worker sidekiq_options queue: :crawl_images, retry: false def perform(image_hash) @image = Image.new(image_hash) @image.image_urls = combine_urls(@image.image_urls, @image.entry_url) timer = Timer.new(45) ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/pipeline/find_critical.rb
app/jobs/image_crawler/pipeline/find_critical.rb
module ImageCrawler module Pipeline class FindCritical include Sidekiq::Worker sidekiq_options queue: :crawl_critical, retry: false def perform(*args) Find.new.perform(*args) end end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/pipeline/process.rb
app/jobs/image_crawler/pipeline/process.rb
module ImageCrawler module Pipeline class Process include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: local_queue("process"), retry: false def perform(image_hash) @image = Image.new(image_hash) Sidekiq.logger.info "Process: public_id=#{@image.id} final_ur...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/image_crawler/pipeline/upload.rb
app/jobs/image_crawler/pipeline/upload.rb
module ImageCrawler module Pipeline class Upload include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: local_queue("crawl"), retry: false def perform(image_hash) @image = Image.new(image_hash) @image.storage_url = upload @image.send_to_feedbin ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/favicon_crawler/processor.rb
app/jobs/favicon_crawler/processor.rb
module FaviconCrawler class Processor attr_reader :host, :favicon_url, :encoded_favicon AWS_S3_BUCKET_FAVICONS = ENV["AWS_S3_BUCKET_FAVICONS"] || ENV["AWS_S3_BUCKET"] def initialize(favicon, host) @favicon = favicon @host = host end def favicon_hash @favicon_hash ||= Digest::S...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/favicon_crawler/finder.rb
app/jobs/favicon_crawler/finder.rb
module FaviconCrawler class Finder include Sidekiq::Worker sidekiq_options retry: false ICON_NAMES = ["shortcut icon", "icon", "apple-touch-icon", "apple-touch-icon-precomposed"] def perform(host, force = false) @favicon = Favicon.unscoped.where(host: host).first_or_initialize @force = f...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/favicon_crawler/image.rb
app/jobs/favicon_crawler/image.rb
module FaviconCrawler class Image INVALID_COLORS = [ -> (color) { color.nil? }, -> (color) { color == "00000000" }, # opacity bit matters for black -> (color) { color.start_with?("ffffff") } # ignore opacity bit for white because the result is white ] def self.resize(*args) ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/search_index_remove.rb
app/jobs/search/search_index_remove.rb
module Search class SearchIndexRemove include Sidekiq::Worker def perform(ids) records = ids.map do |id| Search::BulkRecord.new( action: :delete, index: Entry.table_name, id: id, document: nil ) end Search.client(mirror: true) { _1.bul...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/reindex_feeds.rb
app/jobs/search/reindex_feeds.rb
module Search class ReindexFeeds include Sidekiq::Worker def perform Search.client(mirror: true) do |client| client.reindex(Feed.table_name, mappings: $search[:config][:mappings][:feeds]) do |new_index| reindex(new_index) end end end private def reindex(new...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/add_feed_to_action.rb
app/jobs/search/add_feed_to_action.rb
module Search class AddFeedToAction include Sidekiq::Worker sidekiq_options queue: :network_search def perform(user_id) user = User.find(user_id) actions = user.actions.where(all_feeds: true) actions.each do |action| action.status = if action.invalid? Action.statuses[:...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/touch_actions.rb
app/jobs/search/touch_actions.rb
module Search class TouchActions include Sidekiq::Worker sidekiq_options queue: :network_search def perform(action_ids) actions = Action.find(action_ids) actions.each do |action| action.save end end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/feed_metadata_finder.rb
app/jobs/search/feed_metadata_finder.rb
module Search class FeedMetadataFinder include Sidekiq::Worker sidekiq_options queue: :network_default, retry: false def perform(feed_id) @feed = Feed.find(feed_id) return if Time.at(@feed.meta_crawled_at.to_i).after?(1.month.ago) response = HTTP .timeout(write: 5, connect: 5, r...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/percolate_create.rb
app/jobs/search/percolate_create.rb
module Search class PercolateCreate include Sidekiq::Worker sidekiq_options queue: :network_search def perform(action_id) @action = Action.find(action_id) if @action.computed_feed_ids.empty? percolate_destroy elsif empty_notifier_action? percolate_destroy else ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/actions_perform.rb
app/jobs/search/actions_perform.rb
require "sidekiq/api" module Search class ActionsPerform include Sidekiq::Worker sidekiq_options queue: :network_search, retry: false def perform(entry_id, action_ids, update = false) Sidekiq.logger.info("#{entry_id} actions_ids=#{action_ids}") # Looks like [[8, 1, ["mark_read", "star"]], [7...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/search_server_setup.rb
app/jobs/search/search_server_setup.rb
module Search class SearchServerSetup include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :search_index Client = $search[:servers][:secondary] || $search[:servers][:primary] def perform(batch) ids = build_ids(batch) entries = Entry.where(id: ids).includes(:feed) ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/remove_feed_from_action.rb
app/jobs/search/remove_feed_from_action.rb
module Search class RemoveFeedFromAction include Sidekiq::Worker sidekiq_options queue: :network_search def perform(user_id, feed_id) user = User.find(user_id) actions = user.actions actions.each do |action| feed_ids = action.feed_ids || [] action.feed_ids = feed_ids - [...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/percolate_destroy.rb
app/jobs/search/percolate_destroy.rb
module Search class PercolateDestroy include Sidekiq::Worker sidekiq_options queue: :network_search def perform(action_id) Search.client(mirror: true) { _1.delete(Action.table_name, id: action_id) } end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/search_index_store.rb
app/jobs/search/search_index_store.rb
module Search class SearchIndexStore include Sidekiq::Worker sidekiq_options queue: :network_search def perform(klass, id, update = false) entry = Entry.find(id) document = entry.search_data index(entry, document) percolate(entry, document, update) rescue ActiveRecord::RecordN...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/actions_bulk.rb
app/jobs/search/actions_bulk.rb
module Search class ActionsBulk include Sidekiq::Worker sidekiq_options queue: :network_search, retry: false def perform(action_id, user_id) user = User.find(user_id) action = user.actions.find(action_id) ids = Search.client { _1.all_matches(Entry.table_name, query: action.search_o...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/search/action_tags.rb
app/jobs/search/action_tags.rb
module Search class ActionTags include Sidekiq::Worker sidekiq_options queue: :network_search def perform(user_id, tag_id, tag_id_was) user = User.find(user_id) actions = user.actions.where("? = ANY (tag_ids)", tag_id_was) actions.each do |action| if tag_id_was.present? ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/web_sub/maintenance.rb
app/jobs/web_sub/maintenance.rb
module WebSub class Maintenance include Sidekiq::Worker sidekiq_options retry: false def perform subscribe.each do |feed| Subscribe.perform_in(sometime_today, feed.id) end unsubscribe.each do |feed| Unsubscribe.perform_in(sometime_today, feed.id) end end ...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/web_sub/subscribe.rb
app/jobs/web_sub/subscribe.rb
module WebSub class Subscribe include Sidekiq::Worker sidekiq_options retry: false def perform(feed_id) feed = Feed.find(feed_id) Hub.subscribe(feed) end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/web_sub/hub.rb
app/jobs/web_sub/hub.rb
module WebSub class Hub def initialize(feed) @feed = feed end def self.subscribe(feed) new(feed).subscribe end def self.unsubscribe(feed) new(feed).unsubscribe end def subscribe if @feed.hubs && @feed.self_url perform("subscribe") end end d...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/web_sub/unsubscribe.rb
app/jobs/web_sub/unsubscribe.rb
module WebSub class Unsubscribe include Sidekiq::Worker sidekiq_options retry: false def perform(feed_id) feed = Feed.find(feed_id) feed.update(push_expiration: nil) Hub.unsubscribe(feed) end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/youtube_receiver.rb
app/jobs/feed_crawler/youtube_receiver.rb
module FeedCrawler class YoutubeReceiver include Sidekiq::Worker sidekiq_options queue: :parse def perform(data) ids = data["entries"].map { |entry| entry.safe_dig("data", "youtube_video_id") } embeds = Embed.youtube_video.where(provider_id: ids).index_by(&:provider_id) data["entries"]...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/downloader_critical.rb
app/jobs/feed_crawler/downloader_critical.rb
module FeedCrawler class DownloaderCritical include Sidekiq::Worker sidekiq_options queue: :crawl_critical, retry: false def perform(*args) job = Downloader.new job.critical = true job.perform(*args) end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/persist_crawl_data.rb
app/jobs/feed_crawler/persist_crawl_data.rb
module FeedCrawler class PersistCrawlData include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :utility_critical SET_NAME = "#{name}-updates" def perform updates = dequeue_ids(SET_NAME) return if updates.blank? Sidekiq.logger.info "Migrating count=#{updates.cou...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/parser_critical.rb
app/jobs/feed_crawler/parser_critical.rb
module FeedCrawler class ParserCritical include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: local_queue("parse_critical"), retry: false def perform(*args) Parser.new.perform(*args) end end end
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/parser.rb
app/jobs/feed_crawler/parser.rb
module FeedCrawler class Parser include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: local_queue("parse"), retry: false def perform(feed_id, path, encoding = nil, crawl_data = {}) @feed = Feed.find(feed_id) @feed.crawl_data = crawl_data parse_and_save(@feed, path, e...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/update_youtube_videos.rb
app/jobs/feed_crawler/update_youtube_videos.rb
module FeedCrawler class UpdateYoutubeVideos include Sidekiq::Worker sidekiq_options queue: :utility def perform(feed_id) feed = Feed.find(feed_id) entries = feed.entries ids = entries.filter_map { |entry| entry.data&.safe_dig("youtube_video_id") } embeds = Embed.youtube_video.whe...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/receiver.rb
app/jobs/feed_crawler/receiver.rb
module FeedCrawler class Receiver include Sidekiq::Worker sidekiq_options queue: :parse def perform(data) feed = Feed.find(data["feed"]["id"]) if data["entries"].present? receive_entries(data["entries"], feed) end feed.update(data["feed"]) end def receive_entries(...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/downloader.rb
app/jobs/feed_crawler/downloader.rb
module FeedCrawler class Downloader include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :crawl, retry: false, backtrace: false attr_accessor :critical def perform(feed_id, feed_url, subscribers, crawl_data = {}) @feed_id = feed_id @feed_url = feed_url @...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/schedule.rb
app/jobs/feed_crawler/schedule.rb
module FeedCrawler class Schedule include Sidekiq::Worker include SidekiqHelper sidekiq_options queue: :utility_critical COUNT_KEY = "feed_refresher_scheduler:count".freeze LAST_REFRESH_KEY = "feed_refresher_scheduler:last_refresh".freeze def perform queues = [Downloader, Parser, Recei...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/lib/entry_update.rb
app/jobs/feed_crawler/lib/entry_update.rb
module FeedCrawler class EntryUpdate def initialize(updated_data, original_entry) @updated_data = updated_data @original_entry = original_entry end def self.create!(updated_data, original_entry) new(updated_data, original_entry).create end def create update = @u...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false
feedbin/feedbin
https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/app/jobs/feed_crawler/lib/entry_filter.rb
app/jobs/feed_crawler/lib/entry_filter.rb
module FeedCrawler class EntryFilter def self.filter!(*args, **kwargs) new(*args, **kwargs).filter end def initialize(entries, check_for_changes: true, always_check_recent: false, date_filter: nil) @entries = entries.first(300) @public_ids = @entries.map(&:public_id) @check_for_ch...
ruby
MIT
02911157804301424ec3b1a17e1a9583c09b9e9b
2026-01-04T15:49:01.344805Z
false