LCOGT / mop

Microlensing Observation Portal
GNU General Public License v3.0
0 stars 7 forks source link

Add MOP Active Observations Page #85

Closed rachel3834 closed 11 months ago

rachel3834 commented 11 months ago

The operations team need insight into what TAP recommends for observation.
It is not clear whether the "Requested Observations" menu button is supposed to fulfil this function since this produces a 502 bad gateway error.

MOP should present a view which includes a table of the targets that MOP is currently recommending for observation, together with their priorities and basic model parameters. The view should also include a table summarizing the pending observations requested.

rachel3834 commented 11 months ago

Reviewing MOP's current code, the 'Requested Observations' button in the navbar calls the TOM's own tom_observations.views.ObservationListView. This view returns all observations that the user has permissions to access in the DB.

In the case of MOP (prod) the current list of observation records stands at 106,748 entries. Not huge as databases go, but it does take a significant period of time to retrieve them all from the DB, given the need to verify row-level permissions as it goes. This eventually timesout in a 502 Bad Gateway error. The same code on a test database with only a few observation records works fine.

There is a broader question of optimization for larger-scale TOM systems that goes beyond this issue for MOP. I will raise that with the TOM dev team. In the meantime, I think it will be more useful to replace this navbar option with an active obs page customized for microlensing.

rachel3834 commented 11 months ago

I've replaced the full list of all requested observations with a more selective "Active Obs" list, by adding a custom view and template.