@@ -24,8 +24,8 @@ async def stats():
24
24
25
25
facility_data_health = await facility_service .is_healthy ("nsls2" )
26
26
27
+ # Get the NSLS-II proposals per cycle
27
28
nsls2_proposals_per_cycle : list [ProposalsPerCycleModel ] = []
28
-
29
29
nsls2_cycle_list = await facility_service .facility_cycles ("nsls2" )
30
30
for cycle in nsls2_cycle_list :
31
31
proposal_list = await proposal_service .fetch_proposals_for_cycle (cycle )
@@ -35,13 +35,25 @@ async def stats():
35
35
)
36
36
nsls2_proposals_per_cycle .append (model )
37
37
38
+ # Get the LBMS proposals per cycle
39
+ lbms_proposals_per_cycle : list [ProposalsPerCycleModel ] = []
40
+ lbms_cycle_list = await facility_service .facility_cycles ("lbms" )
41
+ for cycle in lbms_cycle_list :
42
+ proposal_list = await proposal_service .fetch_proposals_for_cycle (cycle )
43
+ if proposal_list is not None :
44
+ model = ProposalsPerCycleModel (
45
+ cycle = cycle , proposal_count = len (proposal_list )
46
+ )
47
+ lbms_proposals_per_cycle .append (model )
48
+
38
49
model = StatsModel (
39
50
facility_count = facilities ,
40
51
beamline_count = beamlines ,
41
52
proposal_count = total_proposals ,
42
53
commissioning_proposal_count = commissioning ,
43
54
facility_data_health = facility_data_health ,
44
55
nsls2_proposals_per_cycle = nsls2_proposals_per_cycle ,
56
+ lbms_proposals_per_cycle = lbms_proposals_per_cycle ,
45
57
)
46
58
return model
47
59
0 commit comments