Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ def configure_scheduled_jobs() -> None:

schedule.every().friday.at("13:00").do(post_inactive_engineers)
schedule.every().day.at("12:00").do(post_priority_bugs)
schedule.every().friday.at("20:00").do(post_leaderboard)
schedule.every().friday.at("16:00", "America/New_York").do(post_leaderboard)
# schedule.every().thursday.at("19:00").do(post_weekly_changelog)
schedule.every().day.at("10:00", "America/New_York").do(post_stale)
schedule.every().day.at("14:00", "America/New_York").do(post_project_updates)
Expand Down
2 changes: 1 addition & 1 deletion linear/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def get_completed_project_issue_assignees(project_id: str) -> list[str]:
"""Return sorted unique assignee display names for a project's completed issues."""
query = gql(
"""
query CompletedProjectIssueAssignees($project_id: String!, $after: String) {
query CompletedProjectIssueAssignees($project_id: ID!, $after: String) {
issues(
first: 50
after: $after
Expand Down
17 changes: 10 additions & 7 deletions tests/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def fake_every(interval=None):
{
"interval": None,
"unit": "friday",
"at_time": "20:00",
"timezone": None,
"at_time": "16:00",
"timezone": "America/New_York",
"func": jobs_module.post_leaderboard,
},
recorded_jobs,
Expand Down Expand Up @@ -204,11 +204,14 @@ def fake_every(interval=None):
class RunDebugJobsTest(unittest.TestCase):
def test_runs_leaderboard_stale_and_project_updates(self):
with patch.object(jobs_module, "should_use_redis_cache", return_value=False):
with patch.object(jobs_module, "post_priority_bugs"):
with patch.object(jobs_module, "post_leaderboard") as leaderboard:
with patch.object(jobs_module, "post_stale") as stale:
with patch.object(jobs_module, "post_project_updates") as project_updates:
jobs_module.run_debug_jobs()
with patch.object(jobs_module, "post_inactive_engineers"):
with patch.object(jobs_module, "post_priority_bugs"):
with patch.object(jobs_module, "post_leaderboard") as leaderboard:
with patch.object(jobs_module, "post_stale") as stale:
with patch.object(
jobs_module, "post_project_updates"
) as project_updates:
jobs_module.run_debug_jobs()

leaderboard.assert_called_once_with()
stale.assert_called_once_with()
Expand Down
3 changes: 3 additions & 0 deletions tests/test_linear_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ def test_paginates_and_returns_sorted_unique_assignees(self):
},
]
calls = []
queries = []

def fake_execute(_query, variable_values=None):
queries.append(str(_query))
calls.append(variable_values)
return responses[len(calls) - 1]

Expand All @@ -121,6 +123,7 @@ def fake_execute(_query, variable_values=None):
{"project_id": "project-2", "after": "issue-cursor-1"},
],
)
self.assertIn("$project_id: ID!", queries[0])
self.assertEqual(assignees, ["Austin Witherow", "Later Page Contributor"])


Expand Down
Loading