Skip to content

Commit 0dd033f

Browse files
committed
fix comment formatting in donation report; use non-cluster-mode for puma
1 parent 1503e7a commit 0dd033f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/models/items/donation.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def self.to_csv
2929
CSV.generate(:headers => true) do |csv|
3030
csv << %w(order_number last first street city state zip email day_phone eve_phone amount date code fund letter_sent letter_sent_by comments)
3131
all.each do |d|
32+
donation_comment,order_comment = d.comments.to_s, d.order.comments.to_s
3233
csv << [
3334
d.order.id,
3435
d.customer.last_name.name_capitalize,
@@ -46,7 +47,9 @@ def self.to_csv
4647
d.account_code.name,
4748
d.letter_sent,
4849
(d.letter_sent ? d.processed_by.full_name : ''),
49-
[d.comments.to_s, d.order.comments.to_s].join('; ')
50+
donation_comment.blank? ?
51+
order_comment :
52+
(order_comment.blank? ? donation_comment : "#{donation_comment}; #{order_comment}")
5053
]
5154
end
5255
end

config/puma.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# footprint of a single dyno. The values here can be overridden by
44
# setting envariables.
55

6-
WORKERS_FOR_BASIC_DYNOS = 1
6+
WORKERS_FOR_BASIC_DYNOS = 0 # avoids overhead of cluster manager
77
WORKERS_FOR_STANDARD_DYNOS = 2
88
workers WORKERS_FOR_BASIC_DYNOS
99
threads_count = 1

0 commit comments

Comments
 (0)