Dead code removal
parent
8c203783a1
commit
a859ebc0ee
|
@ -67,14 +67,6 @@ class Sequence < ApplicationRecord
|
||||||
if destroyed? then true else false end
|
if destroyed? then true else false end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Determines if the current sequence is used by any farmevents, regimens or
|
|
||||||
# sequences.
|
|
||||||
def in_use?
|
|
||||||
[sequence_usage_report.edge_node_count,
|
|
||||||
sequence_usage_report.farm_event_count,
|
|
||||||
sequence_usage_report.regimen_items_count].max != 0
|
|
||||||
end
|
|
||||||
|
|
||||||
# Eagerly load edge_node, primary_node and usage_report. This is a big deal
|
# Eagerly load edge_node, primary_node and usage_report. This is a big deal
|
||||||
# for performance when serializing sequences.
|
# for performance when serializing sequences.
|
||||||
def self.with_usage_reports
|
def self.with_usage_reports
|
||||||
|
|
|
@ -75,14 +75,6 @@ export const selectAllPoints =
|
||||||
(i: ResourceIndex) => findAll<TaggedPoint>(i, "Point");
|
(i: ResourceIndex) => findAll<TaggedPoint>(i, "Point");
|
||||||
export const selectAllActivePoints = (input: ResourceIndex) =>
|
export const selectAllActivePoints = (input: ResourceIndex) =>
|
||||||
selectAllPoints(input).filter(x => !x.body.discarded_at);
|
selectAllPoints(input).filter(x => !x.body.discarded_at);
|
||||||
export const selectAllToolSlots =
|
|
||||||
(i: ResourceIndex): TaggedToolSlotPointer[] => {
|
|
||||||
return betterCompact(selectAllActivePoints(i)
|
|
||||||
.map((x): TaggedToolSlotPointer | undefined => {
|
|
||||||
const y = x.body; // Hack around TS taggedUnion issues (I think).
|
|
||||||
return (y.pointer_type === "ToolSlot") ? { ...x, body: y } : undefined;
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
export const selectAllDiagnosticDumps =
|
export const selectAllDiagnosticDumps =
|
||||||
(i: ResourceIndex) => findAll<TaggedDiagnosticDump>(i, "DiagnosticDump");
|
(i: ResourceIndex) => findAll<TaggedDiagnosticDump>(i, "DiagnosticDump");
|
||||||
|
|
Loading…
Reference in New Issue