packages/ipfs-cluster: notify systemd when ready

This commit is contained in:
Max Headroom 2022-10-22 00:41:16 +02:00
parent 80d52d1193
commit d86429d59e
3 changed files with 4 additions and 2 deletions

View file

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/coreos/go-systemd/v22/daemon"
"github.com/ipfs-cluster/ipfs-cluster/adder"
"github.com/ipfs-cluster/ipfs-cluster/adder/sharding"
"github.com/ipfs-cluster/ipfs-cluster/adder/single"
@ -746,6 +747,7 @@ This might be due to one or several causes:
c.readyB = true
c.shutdownLock.Unlock()
logger.Info("** IPFS Cluster is READY **")
daemon.SdNotify(false, daemon.SdNotifyReady)
}
// Ready returns a channel which signals when this peer is

View file

@ -4,6 +4,7 @@ require (
contrib.go.opencensus.io/exporter/jaeger v0.2.1
contrib.go.opencensus.io/exporter/prometheus v0.4.1
github.com/blang/semver v3.5.1+incompatible
github.com/coreos/go-systemd/v22 v22.3.2
github.com/dgraph-io/badger v1.6.2
github.com/dustin/go-humanize v1.0.0
github.com/golang-jwt/jwt/v4 v4.4.2
@ -86,7 +87,6 @@ require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cheekybits/genny v1.0.0 // indirect
github.com/containerd/cgroups v1.0.3 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect
github.com/cskr/pubsub v1.0.2 // indirect

View file

@ -43,7 +43,7 @@
]);
};
vendorSha256 = "sha256-4pCJnQ/X5bvlgyHcRVZ8LyOexaKmz+1xAntMpZCpvd0=";
vendorSha256 = "sha256-/fy46kF9XN0nrkmgPjFCxHGsqbxabTKFNGKUIoDBDjI=";
doCheck = false;