Esempio n. 1
0
 def retrieve(self, request, *args, **kwargs):
     data = {
         "key": conf.get(ORGANIZATION_KEY) or get_dummy_key(),
         "version": conf.get(PLATFORM_VERSION),
         "dist": conf.get(PLATFORM_DIST),
     }
     return Response(data)
Esempio n. 2
0
 def get(self, request, *args, **kwargs):
     self.init_config()
     config = self.get_config()
     if config and config.should_check():
         config.version = pkg.VERSION
         key = conf.get(ORGANIZATION_KEY) or get_dummy_key()
         config.compatibility = get_compatibility(
             key=key,
             service=PolyaxonServices.PLATFORM,
             version=config.version,
             is_cli=False,
         )
         config.last_check = now()
         self.write_config(config)
     return Response(status=status.HTTP_200_OK)