Skip to content

Instantly share code, notes, and snippets.

@lgvital
Created February 6, 2015 04:39
Show Gist options
  • Save lgvital/e533acf771886947495b to your computer and use it in GitHub Desktop.
Save lgvital/e533acf771886947495b to your computer and use it in GitHub Desktop.
def efficiency_for_team_dates(company, team_id, granularity, ref_dates):
team = Team.load_id(team_id)
projects = team.projects_for(ProjectType.GITHUB)
for project in projects.itervalues():
for ref_date in ref_dates:
start, end = StatsGranularity.get_extents(
granularity, ref_date, team.timezone)
calculate_efficiency.delay(
company, project.id, project.foreign_id, start, end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment