<?php
namespace App\Jobs;
use App\Models\Invoice;
use App\Services\StripeGateway;
CREATE TABLE events (
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
source text NOT NULL,
external_id text NOT NULL,
payload jsonb NOT NULL,
occurred_at timestamptz NOT NULL,
class DebouncedReindexJob
include Sidekiq::Job
sidekiq_options queue: :indexing, retry: 5
DEBOUNCE_DELAY = 5 # seconds
import hmac
import hashlib
import time
from fastapi import Request, HTTPException, status
const RETRYABLE_STATUS = new Set([408, 429, 500, 502, 503, 504]);
export function isRetryable(error: unknown, response?: Response): boolean {
if (response) {
return RETRYABLE_STATUS.has(response.status);
}
class InventoryLevel < ApplicationRecord
belongs_to :warehouse
UPSERT_COLUMNS = %w[warehouse_id sku on_hand reserved updated_at].freeze
def self.upsert_counts(rows)
class LikesController < ApplicationController
before_action :set_post
def create
@like = @post.likes.find_or_create_by(user: current_user)