From b74e0f9d65af604ccce5058821dc27013800d03e Mon Sep 17 00:00:00 2001 From: Adriaan Renting <renting@astron.nl> Date: Fri, 27 Nov 2015 11:50:58 +0000 Subject: [PATCH] Task #8481: added add_resource_allocation_statics.sql --- .gitattributes | 1 + .../sql/add_resource_allocation_statics.sql | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 SAS/ResourceAssignment/ResourceAllocationDatabase/sql/add_resource_allocation_statics.sql diff --git a/.gitattributes b/.gitattributes index 3b3e8dd7614..5ab0d2486a1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4816,6 +4816,7 @@ SAS/OTDB/src/setStatus.conf -text SAS/OTDB/test/tBrokenHardware.cc -text SAS/OTDB/test/tMetadata.cc -text SAS/OTDB/test/tQueryPIC.cc -text +SAS/ResourceAssignment/ResourceAllocationDatabase/sql/add_resource_allocation_statics.sql -text SAS/ResourceAssignment/ResourceAllocationDatabase/sql/create_add_virtual_instrument.sql.py -text SAS/ResourceAssignment/ResourceAllocationDatabase/sql/create_database.sql -text SAS/ResourceAssignment/ResourceAllocationDatabase/tests/fill_database.sql -text diff --git a/SAS/ResourceAssignment/ResourceAllocationDatabase/sql/add_resource_allocation_statics.sql b/SAS/ResourceAssignment/ResourceAllocationDatabase/sql/add_resource_allocation_statics.sql new file mode 100644 index 00000000000..8ef850f3597 --- /dev/null +++ b/SAS/ResourceAssignment/ResourceAllocationDatabase/sql/add_resource_allocation_statics.sql @@ -0,0 +1,11 @@ +-- resourceassignment password for testing on mcu005 is the same as the password on the president's luggage +6 +-- psql resourceassignment -U resourceassignment -f fill_database.sql -W +BEGIN; + +INSERT INTO resource_allocation.task_status VALUES (200, "prepared"), (300, "approved"), (320, "on_hold"), (335, "conflict"), +(350, "prescheduled"), (400, "scheduled"), (500, "queued"), (600, "active"), (900, "completing"), (1000, "finished"), (1100, "aborted"), +(1150, "error"), (1200, "obsolete"); -- This is the list from OTDB, we'll need to merge it with the list from MoM in the future, might use different indexes? +INSERT INTO resource_allocation.task_type VALUES (0, 'OBSERVATION'),(1, 'PIPELINE'); -- We'll need more types +INSERT INTO resource_allocation.resource_claim_status VALUES (0, 'CLAIMED'), (1, 'ALLOCATED'), (2, 'CONFLICT'); +INSERT INTO resource_allocation.config VALUES (0, 'max_fill_percentage_cep4', '85.00'), (1, 'claim_timeout', '172800'); -- Just some values 172800 is two days in seconds +COMMIT; -- GitLab