Re: using database for queuing operations?

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: using database for queuing operations?
Дата
Msg-id 20040920203957.GG1297@decibel.org
обсуждение исходный текст
Ответ на Re: using database for queuing operations?  (Jeff Amiel <jamiel@istreamimaging.com>)
Список pgsql-general
On Mon, Sep 20, 2004 at 03:08:29PM -0500, Jeff Amiel wrote:
> Add a column to the nameq table designating the 'state' of the image.
> Then your logic changes to "select * from nameq where serial = (select
> min(serial) from nameq) and state="UNPROCESSED" (or whatever)
> So you select for update, change the state, then process the
> image....then delete.
> Viola!

You should also consider what happens if the conversion program can't
update the state to processed for some reason. For example, pgsql might
get shutdown unexpectedly, or the conversion process could.
--
Jim C. Nasby, Database Consultant               decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

В списке pgsql-general по дате отправления:

Предыдущее
От: Mark Harrison
Дата:
Сообщение: Re: using database for queuing operations?
Следующее
От: Jeff Amiel
Дата:
Сообщение: Re: using database for queuing operations?