Skip to content

Commit

Permalink
Merge pull request #115 from ryran/fixes-to-handle-shared-resources
Browse files Browse the repository at this point in the history
tons of fixes & enhancements -- #108 #111 #112 #113 #114
  • Loading branch information
ryran authored Feb 1, 2017
2 parents 57073d3 + 1c4ed4e commit 9a6de16
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 262 deletions.
4 changes: 2 additions & 2 deletions modules/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
prog = 'ravshello'

# Version info
__version__ = '1.12.2'
__date__ = '2017/01/31'
__version__ = '1.13.0'
__date__ = '2017/02/01'
version = "{} v{} last mod {}".format(prog, __version__, __date__)

# Defaults
Expand Down
7 changes: 5 additions & 2 deletions modules/ravello_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,18 @@ def get_bp(self, bpId):
else:
return None

def get_bps(self):
def get_bps(self, myOrgOnly=False):
try:
ts = self._bpCache_tstamp
except:
self.update_bp_cache()
else:
if ui.get_timestamp_proximity(ts) < -120:
self.update_bp_cache()
return self.bpCache.values()
if myOrgOnly:
return [bp for bp in self.bpCache.values() if self.get_user(bp['ownerDetails']['userId'])]
else:
return self.bpCache.values()

def update_app_cache(self, appId=None):
if appId:
Expand Down
Loading

0 comments on commit 9a6de16

Please sign in to comment.