mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-24 12:47:43 +00:00
fix up heroku
This commit is contained in:
parent
2b5758cc5c
commit
e965922892
3 changed files with 11 additions and 3 deletions
4
Procfile
4
Procfile
|
@ -1,2 +1,2 @@
|
|||
postgres: postgres -D tmp/postgresql
|
||||
pgbouncer: pgbouncer -q config/pgbouncer.ini
|
||||
web: cmd/apollo-api
|
||||
worker cmd/apollo-worker
|
||||
|
|
|
@ -29,7 +29,7 @@ type application struct {
|
|||
var workers int = runtime.NumCPU() * 2
|
||||
|
||||
func accountWorker(id int, rc *reddit.Client, db *sql.DB, logger *log.Logger, quit chan bool) {
|
||||
authKey, err := token.AuthKeyFromFile("./tmp/authkey.p8")
|
||||
authKey, err := token.AuthKeyFromFile(os.Getenv("APPLE_AUTHKEY_PATH"))
|
||||
token := &token.Token{
|
||||
AuthKey: authKey,
|
||||
KeyID: "T88A7G9LZ8",
|
||||
|
@ -131,6 +131,8 @@ func main() {
|
|||
}
|
||||
defer db.Close()
|
||||
|
||||
logger.Printf("Starting with %d workers.", workers)
|
||||
|
||||
db.SetMaxOpenConns(workers)
|
||||
|
||||
// This is a very conservative value -- seen as most of the work that is done in these jobs is
|
||||
|
|
6
secret/authkey.p8
Normal file
6
secret/authkey.p8
Normal file
|
@ -0,0 +1,6 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgiiEuhYosEeqNnX6t
|
||||
BU6tqvo1s1lGPweAOYyUevjPqTOgCgYIKoZIzj0DAQehRANCAAS2h9dR3rmQ6iRt
|
||||
rW8CC4ay9fLBGSRDv0Ptl6oAKbMGJbqkYcxOpR8zjSv3SE/dHaDWd/HK/3uqtb2i
|
||||
TMJBpgHa
|
||||
-----END PRIVATE KEY-----
|
Loading…
Reference in a new issue