Skip to content
Snippets Groups Projects
Commit ece616b0 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-41: no special case for resource 117 anymore

parent 5a1dc1cb
Branches
Tags
No related merge requests found
......@@ -896,17 +896,14 @@ BEGIN
--update the resource usages affected by this claim
--do this before we check for conflicts, because this claim might be shifted for example
--which might influence the resource_usages which determine wheter a claim fits.
IF OLD.resource_id <> 117 THEN --20180903: skip checking of cep4 storage until JIRA SW-35 is solved.
PERFORM resource_allocation.process_old_claim_outof_resource_usages(OLD);
END IF;
END IF;
--only check claim if status and/or claim_size and/or start/end time changed
IF TG_OP = 'INSERT' OR (TG_OP = 'UPDATE' AND (OLD.status_id <> NEW.status_id OR
OLD.claim_size <> NEW.claim_size OR
OLD.starttime <> NEW.starttime OR
OLD.endtime <> NEW.endtime)) THEN
IF NEW.resource_id <> 117 THEN --20180903: skip checking of cep4 storage until JIRA SW-35 is solved.
--check if claim fits or has conflicts
SELECT * FROM resource_allocation.has_conflict_with_overlapping_claims(NEW) INTO claim_has_conflicts;
......@@ -927,7 +924,6 @@ BEGIN
NEW.status_id := claim_tentative_status_id;
END IF;
END IF;
END IF;
IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN
--update the resource usages affected by this claim
......@@ -1002,7 +998,6 @@ BEGIN
AND rc.endtime >= OLD.starttime
AND rc.starttime < OLD.endtime LOOP
IF affected_claim.resource_id <> 117 THEN --20180903: skip checking of cep4 storage until JIRA SW-35 is solved.
--check if claim fits or has conflicts
SELECT * FROM resource_allocation.has_conflict_with_overlapping_claims(affected_claim) INTO claim_has_conflicts;
......@@ -1010,7 +1005,6 @@ BEGIN
-- no conflict (anymore) with others, so set claim status to tentative
UPDATE resource_allocation.resource_claim SET status_id=claim_tentative_status_id WHERE id = affected_claim.id;
END IF;
END IF;
END LOOP;
END IF;
......@@ -1025,7 +1019,6 @@ BEGIN
AND rc.endtime >= NEW.starttime
AND rc.starttime < NEW.endtime LOOP
IF affected_claim.resource_id <> 117 THEN --20180903: skip checking of cep4 storage until JIRA SW-35 is solved.
--check if claim fits or has conflicts
SELECT * FROM resource_allocation.has_conflict_with_overlapping_claims(affected_claim) INTO claim_has_conflicts;
......@@ -1033,7 +1026,6 @@ BEGIN
-- new conflict for affected_claim because this NEW claim is now claimed
UPDATE resource_allocation.resource_claim SET status_id=claim_conflict_status_id WHERE id = affected_claim.id;
END IF;
END IF;
END LOOP;
END IF;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment