     groupConfigs[options.group]       or= {}
     groupConfigs[options.group][name] or= {}
 
-    conf += generateSupervisorSectionForWorker name, options
+    conf += generateWorkerSection name, options, KONFIG
 
 
   # add group sections

    stopsignal              : "TERM"
    stopwaitsecs            : 10
    redirect_stderr         : yes
    stdout_logfile          : "/var/log/koding/#{app}.log"
    stdout_logfile_maxbytes : "1MB"
    stdout_logfile_backups  : 10
    stdout_capture_maxbytes : "1MB"

  """

# becareful while editing this function, any change will affect every worker
generateWorkerSection = (app, options={}, KONFIG) ->

  {projectRoot} = KONFIG
  {supervisord: {logdir}} = KONFIG

  section =
    command                 : "command"
    stdout_logfile_maxbytes : "10MB"
    stdout_logfile_backups  : 50
    stderr_logfile          : "#{logdir}/#{app}.log"
    stdout_logfile          : "#{logdir}/#{app}.log"
    numprocs                : options.instances or 1
    numprocs_start          : 0
    directory               : projectRoot
    autostart               : yes
    autorestart             : yes
    startsecs               : 10
