Skip to content

Commit

Permalink
feat: sleep 15 minutes between pushes
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
  • Loading branch information
berezovskyi committed Jul 17, 2023
1 parent 87f0680 commit 58e9058
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions publisher.zig
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ fn commitAndPushRepoChange(log_repo_path: []const u8) !void {

fn pushRepoChange(log_repo_path: []const u8) !void {
try runNoCapture(log_repo_path, &[_][]const u8 {"git", "push", "origin", "HEAD:live", "-f"});
// don't push to GH more frequently than once in 15 minutes
std.time.sleep(@as(u64, 15 * 60) * std.time.ns_per_s);
}

fn formatRepoLogFilename(buf: []u8, year_day: epoch.YearAndDay, month_day: epoch.MonthAndDay) usize {
Expand Down

0 comments on commit 58e9058

Please sign in to comment.