Opened 11 years ago

Closed 9 years ago

Last modified 6 years ago

#376 closed improve feature (wontfix)

Managing Nb Members redudancy for new geo system

Reported by: jeanyves Owned by:
Priority: minor Milestone: Legacy Resolved
Component: BW Geo Keywords: new geo, NbMembers
Cc: steinwinde

Description

I have create countries.NbMembers?, regions.NbMembers?, and cities.NbMembers? in the current Db model

these values can be kept accurate by a global daily(nightly ?) cron

but we also must keep in mind to update the record when :

  • a new member is accepted
  • if he is no more active because he choose to be inactive
  • if he is no more active because he choose to leave
  • if he is no more active because he is kicked
  • if his addresse update is confirmed

no emergency, this is just a reminder.

Content of the daily cron :

update countries set NbMembers=(select count(*) from members,cities,regions where members.IdCity=cities.id and cities.IdRegion=regions.id and members.Status='Active' and regions.IdCountry=countries.id) ;
update regions set NbMembers=(select count(*) from members,cities where members.IdCity=cities.id and cities.IdRegion=regions.id and members.Status='Active' and regions.id=cities.id) ;
update cities set NbMembers=(select count(*) from members where members.IdCity=cities.id and members.Status='Active') where cities.id in (select distinct IdCity from members) ;

Change History (3)

comment:1 Changed 11 years ago by philipp

  • Milestone changed from BigPicture to unassigned

Milestone BigPicture? deleted

comment:2 Changed 9 years ago by fake51

  • freq_reported set to 1
  • Resolution set to wontfix
  • show_on_bw set to 0
  • Status changed from new to closed

Data model has changed, we're moving away from these views, so this is no longer an issue

comment:3 Changed 6 years ago by TimLoal

  • Component changed from unknown to BW Geo
  • Milestone changed from unassigned to Legacy Resolved
  • Type changed from unknown to improve feature
Note: See TracTickets for help on using tickets.