<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>aeleniumfor</author_name>
  <author_url>https://blog.hatena.ne.jp/aeleniumfor/</author_url>
  <blog_title>わからん</blog_title>
  <blog_url>https://nenesan.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>flask</anon>
    <anon>sqlalchemy</anon>
    <anon>postgresql</anon>
  </categories>
  <description>はじめに アプリケーションで非同期処理を行う際、RabbitMQのようなキューは大変便利です。 ただし、今回プライベートで作成していたアプリケーションでは、シンプルな機能だけで十分でした（可視性タイムアウトやACKなどの高度な機能は必要ありません）。 また、構成を極力簡素に保ちたいため、別途キュー用のミドルウェアを設置することは避けたいと考えました。 そこで、今回はDBにシンプルなキューの役割を担ってもらうことにしました。 調べてみると、Postgres の機能の一つに SKIP LOCKED という機能がありこれを利用することでキューのようなことを実現できそうです。※1 今回は、Flask …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnenesan.hatenablog.com%2Fentry%2F2023%2F12%2F14%2F100000&quot; title=&quot;FlaskとSQLAlchemyで作るPostgreSQLを使ったシンプルなキューの実装 - わからん&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-12-14 10:00:00</published>
  <title>FlaskとSQLAlchemyで作るPostgreSQLを使ったシンプルなキューの実装</title>
  <type>rich</type>
  <url>https://nenesan.hatenablog.com/entry/2023/12/14/100000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
