This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# db/migrate/#{timestamp}_add_owner_to_delayed_jobs | |
class AddOwnerToDelayedJobs < ActiveRecord::Migration | |
def self.up | |
add_column(:delayed_jobs, :owner_type, :string) | |
add_column(:delayed_jobs, :owner_id, :integer) | |
end | |
def self.down | |
remove_column(:delayed_jobs, :owner_type) | |
remove_column(:delayed_jobs, :owner_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import aiohttp | |
from time import time, gmtime | |
from aiohttp.helpers import TimeService | |
def _format_date_time(timestamp): | |
# Weekday and month names for HTTP date/time formatting; | |
# always English! | |
# Tuples are contants stored in codeobject! |