#37 ✓resolved
James McKinney

-s directive not saved on `thin config`

Reported by James McKinney | February 8th, 2008 @ 10:52 PM | in 0.7.0

I'm running thin 0.6.3 on Ubuntu.

When I run thin config -s 3 -C /etc/thin/myapp.yml, I get:


pid: tmp/pids/thin.pid
log: log/thin.log
timeout: 60
port: 3000
environment: development
chdir: /etc/thin
address: 0.0.0.0
daemonize: true

which omits "servers: 3", although I set it...

Comments and changes to this ticket

  • macournoyer

    macournoyer February 8th, 2008 @ 11:48 PM

    • Milestone set to 0.7.0
    • State changed from “new” to “open”

    nice catch James, seems to be the only option not saved to the config file. I'll fix that.

  • Matt Todd

    Matt Todd February 9th, 2008 @ 03:57 PM

    The problem is that Controllers::Cluster#initialize deletes the :servers key from @options and stores it in @size.

    One potential solution would be to not delete :servers if the command is 'config'... but that value isn't immediately available in Controllers::Cluster#initialize.

    Alternatively, one solution could simply be to have a little wrapper Controllers::Cluster#config method that adds :servers back into @options.

    But, now you know why it's being left out.

  • Matt Todd

    Matt Todd February 9th, 2008 @ 03:38 PM

    The problem is that Controllers::Cluster#initialize deletes the :servers key from @options and stores it in @size.

    One potential solution would be to not delete :servers if the command is 'config'... but that value isn't immediately available in Controllers::Cluster#initialize.

    Alternatively, one solution could simply be to have a little wrapper Controllers::Cluster#config method that adds :servers back into @options.

    But, now you know why it's being left out.

  • macournoyer

    macournoyer February 9th, 2008 @ 04:07 PM

    • State changed from “open” to “resolved”

    Fixed in http://github.com/macournoyer/th...

    I removed the code deleting the options and just removed them before sending it as a command to individual servers. Let me know what you think Matt.

    and thx for reporting James.

  • Matt Todd

    Matt Todd February 9th, 2008 @ 07:48 PM

    Seems good to me, considering it's a bit more forward-thinking so if you have other options you need to exclude later on, it's easy to update.

    Nice and simple solution.

  • Matt Todd

    Matt Todd February 9th, 2008 @ 08:01 PM

    (Sorry for the double post... apparently had network problems when I posted it so didn't realize it went through the first time.)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages