Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
aa9a289c
Commit
aa9a289c
authored
Nov 11, 2016
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make mail_room idle_timeout option configurable.
parent
05be65f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
1 deletion
+5
-1
config/gitlab.yml.example
config/gitlab.yml.example
+2
-0
config/mail_room.yml
config/mail_room.yml
+1
-1
lib/gitlab/mail_room.rb
lib/gitlab/mail_room.rb
+1
-0
spec/config/mail_room_spec.rb
spec/config/mail_room_spec.rb
+1
-0
No files found.
config/gitlab.yml.example
View file @
aa9a289c
...
...
@@ -138,6 +138,8 @@ production: &base
# The mailbox where incoming mail will end up. Usually "inbox".
mailbox: "inbox"
# The mailbox where incoming mail will end up. Usually "inbox".
idle_timeout: 60
## Build Artifacts
artifacts:
...
...
config/mail_room.yml
View file @
aa9a289c
...
...
@@ -15,7 +15,7 @@
:start_tls: <%= config[:start_tls].to_json %>
:email: <%= config[:user].to_json %>
:password: <%= config[:password].to_json %>
:idle_timeout:
60
:idle_timeout:
<%= config[:idle_timeout].to_json %>
:name: <%= config[:mailbox].to_json %>
...
...
lib/gitlab/mail_room.rb
View file @
aa9a289c
...
...
@@ -31,6 +31,7 @@ module Gitlab
config
[
:ssl
]
=
false
if
config
[
:ssl
].
nil?
config
[
:start_tls
]
=
false
if
config
[
:start_tls
].
nil?
config
[
:mailbox
]
=
'inbox'
if
config
[
:mailbox
].
nil?
config
[
:idle_timeout
]
=
60
if
config
[
:idle_timeout
].
nil?
if
config
[
:enabled
]
&&
config
[
:address
]
gitlab_redis
=
Gitlab
::
Redis
.
new
(
rails_env
)
...
...
spec/config/mail_room_spec.rb
View file @
aa9a289c
...
...
@@ -47,6 +47,7 @@ describe 'mail_room.yml' do
expect
(
mailbox
[
:email
]).
to
eq
(
'gitlab-incoming@gmail.com'
)
expect
(
mailbox
[
:password
]).
to
eq
(
'[REDACTED]'
)
expect
(
mailbox
[
:name
]).
to
eq
(
'inbox'
)
expect
(
mailbox
[
:idle_timeout
]).
to
eq
(
60
)
redis_url
=
gitlab_redis
.
url
sentinels
=
gitlab_redis
.
sentinels
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment