diff --git a/.gitattributes b/.gitattributes index 3b3e8dd7614e07d4f444904fef9b61e33dc99a30..5ab0d2486a12db917cb88fd63539ab47622eaf0a 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 0000000000000000000000000000000000000000..8ef850f3597ed9a4a193f5b9837d3c3843173d70 --- /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;