Skip to content

Commit

Permalink
Merge pull request #12 from josegonzalez/master
Browse files Browse the repository at this point in the history
Release 0.4.0
  • Loading branch information
josegonzalez authored Aug 18, 2018
2 parents 53ea0ee + 894f1dc commit 0d1e982
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MAINTAINER = josegonzalez
MAINTAINER_NAME = Jose Diaz-Gonzalez
REPOSITORY = go-procfile-util
HARDWARE = $(shell uname -m)
BASE_VERSION ?= 0.3.0
BASE_VERSION ?= 0.4.0
IMAGE_NAME ?= $(MAINTAINER)/$(REPOSITORY)
PACKAGECLOUD_REPOSITORY ?= dokku/dokku-betafish

Expand Down
5 changes: 5 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<<<<<<< HEAD=0
web: python -p $PORT server
======
worker: python work.py --derp $PS
>>>>>>> 5bb7ec3e2a8f4f6565432a4fc82c92d4a3603d28=0
19 changes: 9 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,17 @@ func infoMessage(message string) {
}

func getProcfile(path string) (string, error) {
if !termutil.Isatty(os.Stdin.Fd()) {
debugMessage("Reading input from stdin")
bytes, err := ioutil.ReadAll(os.Stdin)
if err != nil {
return "", err
}
return string(bytes), nil
}

debugMessage(fmt.Sprintf("Reading input from file: %v", path))
debugMessage(fmt.Sprintf("Attempting to read input from file: %v", path))
f, err := os.Open(path)
if err != nil {
if !termutil.Isatty(os.Stdin.Fd()) {
debugMessage("Reading input from stdin")
bytes, err := ioutil.ReadAll(os.Stdin)
if err != nil {
return "", err
}
return string(bytes), nil
}
return "", err
}
defer f.Close()
Expand Down
53 changes: 53 additions & 0 deletions test.Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
###############################
# DEVELOPMENT #
###############################

# Procfile for development using the new threaded worker (scheduler, twitter stream and delayed job)
cron: node worker.js
web: node web.js # testing inline comment
worker: node worker.js
custom: echo -n


# Old version with separate processes (use this if you have issues with the threaded version)
# web: bundle exec rails server
# schedule: bundle exec rails runner bin/schedule.rb
# twitter: bundle exec rails runner bin/twitter_stream.rb
# dj: bundle exec script/delayed_job run

###############################
# PRODUCTION #
###############################

# You need to copy or link config/unicorn.rb.example to config/unicorn.rb for both production versions.
# Have a look at the deployment guides, if you want to set up huginn on your server:
# https://github.com/cantino/huginn/doc

# Using the threaded worker (consumes less RAM but can run slower)
# web: bundle exec unicorn -c config/unicorn.rb
# jobs: bundle exec rails runner bin/threaded.rb

# Old version with separate processes (use this if you have issues with the threaded version)
# web: bundle exec unicorn -c config/unicorn.rb
# schedule: bundle exec rails runner bin/schedule.rb
# twitter: bundle exec rails runner bin/twitter_stream.rb
# dj: bundle exec script/delayed_job run

###############################
# Multiple DelayedJob workers #
###############################
# Per default Huginn can just run one agent at a time. Using a lot of agents or calling slow
# external services frequently might require more DelayedJob workers (an indicator for this is
# a backlog in your 'Job Management' page).
# Every uncommented line starts an additional DelayedJob worker. This works for development, production
# and for the threaded and separate worker processes. Keep in mind one worker needs about 300MB of RAM.
#
#dj2: bundle exec script/delayed_job -i 2 run
#dj3: bundle exec script/delayed_job -i 3 run
#dj4: bundle exec script/delayed_job -i 4 run
#dj5: bundle exec script/delayed_job -i 5 run
#dj6: bundle exec script/delayed_job -i 6 run
#dj7: bundle exec script/delayed_job -i 7 run
#dj8: bundle exec script/delayed_job -i 8 run
#dj9: bundle exec script/delayed_job -i 9 run
#dj10: bundle exec script/delayed_job -i 10 run

0 comments on commit 0d1e982

Please sign in to comment.