-
-
Save tomredsky/0f99d14d409df5cf89d273572ca3dfdf to your computer and use it in GitHub Desktop.
create type queue_status as enum('new', 'inprogress', 'done'); | |
create table delivery_queue ( | |
delivery_id int not null primary key references dl (id) on delete cascade, | |
date_entered timestamp not null default current_timestamp, | |
status queue_status not null default 'new' | |
); |
Possibly add a date_processed timestamp as well.
Also, use timestamp_tz as that includes the timezone. Less likely to have errors relating to summer/winter-time switchovers.
If the queue uses delivery_id, then aren't we expecting that there will be a delivery note for website uploads?
If the queue uses delivery_id, then aren't we expecting that there will be a delivery note for website uploads?
There is a dl
record for every web download. Is that what you mean?
I'd add a "failed" to the queue_status.
Good shout. For the record, I was not sure about done but I envisage the row being deleted once the ExportMedia::S3 had done it's thing.
There is a dl record for every web download. Is that what you mean?
If there is, then why did I do all that work to rewrite the S3 code to not rely on a delivery note?
I'd add a "failed" to the queue_status.