When listing webapp.s, delete records for any not found living.

This sends a HEAD request to the registered URL for the webapp and
assumes that the app is dead if result is not 200.

This change caused a cascade of changes to the treatment of the
database table, because the DBMS layer insists that a table's primary
key be INTEGER.  It was necessary to introduce a new column for the
purpose.  This also means you can have more than one running instance
of the same UI, if you wish.  But it also means that the sequence
required by the new column will overflow after about 2 billion starts.
This commit is contained in:
Mark H. Wood
2013-06-25 15:10:55 -04:00
parent de9a3d73b4
commit b165134114
8 changed files with 127 additions and 16 deletions

View File

@@ -109,6 +109,7 @@ CREATE SEQUENCE harvested_collection_seq;
CREATE SEQUENCE harvested_item_seq;
CREATE SEQUENCE versionitem_seq;
CREATE SEQUENCE versionhistory_seq;
CREATE SEQUENCE webapp_seq;
-------------------------------------------------------
-- BitstreamFormatRegistry table
@@ -800,8 +801,9 @@ CREATE TABLE versionitem
CREATE TABLE Webapp
(
AppName VARCHAR(32) NOT NULL PRIMARY KEY,
URL VARCHAR NOT NULL,
webapp_id INTEGER NOT NULL PRIMARY KEY,
AppName VARCHAR(32),
URL VARCHAR,
Started TIMESTAMP,
isUI Boolean
isUI INTEGER
);