class NotifyFollowersJob
include Sidekiq::Job
sidekiq_options queue: :notifications, retry: 5
def perform(post_id, actor_id)
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::thread;
fn main() {
let counter = Arc::new(AtomicUsize::new(0));
class AddUniqueIndexToInventorySnapshots < ActiveRecord::Migration[7.1]
disable_ddl_transaction!
def change
add_index :inventory_snapshots,
[:warehouse_id, :sku],
package cache
import (
"context"
"sync"
"time"
import Redis from "ioredis";
export const redis = new Redis(process.env.REDIS_URL ?? "redis://localhost:6379");
export interface Codec<T> {
encode(value: T): string;
ALTER TABLE documents ADD COLUMN version BIGINT NOT NULL DEFAULT 0;
class Document < ApplicationRecord
belongs_to :account
validates :source_url, presence: true
before_save :normalize_checksum
module ConditionalGet
extend ActiveSupport::Concern
private
def render_conditional(resource, extra: nil)
package com.example.demo.service;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.List;
use std::collections::HashMap;
use std::hash::Hash;
use std::sync::{Arc, RwLock};
pub struct Memoizer<K, V> {
store: RwLock<HashMap<K, Arc<V>>>,
package workpool
import (
"context"
"sync"
)
class CreateStripeEvents < ActiveRecord::Migration[7.1]
def change
create_table :stripe_events do |t|
t.string :stripe_event_id, null: false
t.string :event_type, null: false
t.string :status, null: false, default: "received"