Switch globalpromstats worker to use a data interface
This commit is contained in:
parent
0629a13da2
commit
8e179cb865
3 changed files with 50 additions and 5 deletions
18
workers/globalpromstats/models_pre_oci.py
Normal file
18
workers/globalpromstats/models_pre_oci.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from data import model
|
||||
|
||||
from workers.globalpromstats.models_interface import GlobalPromStatsWorkerDataInterface
|
||||
|
||||
class PreOCIModel(GlobalPromStatsWorkerDataInterface):
|
||||
def get_repository_count(self):
|
||||
return model.repository.get_repository_count()
|
||||
|
||||
def get_active_user_count(self):
|
||||
return model.user.get_active_user_count()
|
||||
|
||||
def get_active_org_count(self):
|
||||
return model.organization.get_active_org_count()
|
||||
|
||||
def get_robot_count(self):
|
||||
return model.user.get_robot_count()
|
||||
|
||||
pre_oci_model = PreOCIModel()
|
Reference in a new issue