Skip to content

Commit

Permalink
Merge pull request #13 from hnez/systemd-notify-early
Browse files Browse the repository at this point in the history
ingres: poll: do not poll before notifying systemd
  • Loading branch information
hnez authored Aug 28, 2024
2 parents 372b74f + 1b76a0f commit 2e80f6e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/ingres/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl Poller {
/// How far back to go in the run history is decided by `MAX_NEW_RUN_AGE`,
/// the most recent run id already known for the repository and the list
/// of runs the `create::jobs::Manager` is interested in.
pub async fn poll_once(&self) -> octocrab::Result<()> {
async fn poll_once(&self) -> octocrab::Result<()> {
let cfg = self.config.get();

// These are runs for which we have jobs in "interesting" states,
Expand Down
4 changes: 0 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ async fn forrest() -> anyhow::Result<()> {
// missed webhooks.
let poller = ingres::Poller::new(config.clone(), auth.clone(), job_manager);

// Make sure we can reach GitHub and our authentication works before
// signaling readiness to systemd.
poller.poll_once().await?;

log::info!("Startup complete. Handling requests");

// Notify systemd that we are ready to handle requests.
Expand Down

0 comments on commit 2e80f6e

Please sign in to comment.