Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/sql/30-schema.sql
Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | create table origin_visit_stats ( | ||||
last_scheduled timestamptz, | last_scheduled timestamptz, | ||||
-- last snapshot resulting from an eventful visit | -- last snapshot resulting from an eventful visit | ||||
last_snapshot bytea, | last_snapshot bytea, | ||||
-- position in the global queue, the "time" at which we expect the origin to have new | -- position in the global queue, the "time" at which we expect the origin to have new | ||||
-- objects | -- objects | ||||
next_visit_queue_position timestamptz, | next_visit_queue_position timestamptz, | ||||
-- duration that we expect to wait between visits of this origin | -- duration that we expect to wait between visits of this origin | ||||
next_position_offset int not null default 4, | next_position_offset int not null default 4, | ||||
successive_visits int not null default 0, | |||||
primary key (url, visit_type) | primary key (url, visit_type) | ||||
); | ); | ||||
comment on table origin_visit_stats is 'Aggregated information on visits for each origin in the archive'; | comment on table origin_visit_stats is 'Aggregated information on visits for each origin in the archive'; | ||||
comment on column origin_visit_stats.url is 'Origin URL'; | comment on column origin_visit_stats.url is 'Origin URL'; | ||||
comment on column origin_visit_stats.visit_type is 'Type of the visit for the given url'; | comment on column origin_visit_stats.visit_type is 'Type of the visit for the given url'; | ||||
comment on column origin_visit_stats.last_eventful is 'Date of the last eventful event'; | comment on column origin_visit_stats.last_eventful is 'Date of the last eventful event'; | ||||
comment on column origin_visit_stats.last_uneventful is 'Date of the last uneventful event'; | comment on column origin_visit_stats.last_uneventful is 'Date of the last uneventful event'; | ||||
comment on column origin_visit_stats.last_failed is 'Date of the last failed event'; | comment on column origin_visit_stats.last_failed is 'Date of the last failed event'; | ||||
comment on column origin_visit_stats.last_notfound is 'Date of the last notfound event'; | comment on column origin_visit_stats.last_notfound is 'Date of the last notfound event'; | ||||
comment on column origin_visit_stats.last_scheduled is 'Time when this origin was scheduled to be visited last'; | comment on column origin_visit_stats.last_scheduled is 'Time when this origin was scheduled to be visited last'; | ||||
comment on column origin_visit_stats.last_snapshot is 'sha1_git of the last visit snapshot'; | comment on column origin_visit_stats.last_snapshot is 'sha1_git of the last visit snapshot'; | ||||
comment on column origin_visit_stats.next_visit_queue_position is 'Time at which some new objects are expected to be found'; | comment on column origin_visit_stats.next_visit_queue_position is 'Time at which some new objects are expected to be found'; | ||||
comment on column origin_visit_stats.next_position_offset is 'Duration that we expect to wait between visits of this origin'; | comment on column origin_visit_stats.next_position_offset is 'Duration that we expect to wait between visits of this origin'; | ||||
comment on column origin_visit_stats.successive_visits is 'number of successive visits with the same status'; | |||||
create table visit_scheduler_queue_position ( | create table visit_scheduler_queue_position ( | ||||
visit_type text not null, | visit_type text not null, | ||||
position timestamptz not null, | position timestamptz not null, | ||||
primary key (visit_type) | primary key (visit_type) | ||||
); | ); | ||||
Show All 24 Lines |