README.markdown in simple_worker-1.0.10 vs README.markdown in simple_worker-1.0.11

- old
+ new

@@ -261,10 +261,27 @@ #or merge_mailer 'mailer_file', {:path_to_templates=>"templates_path"}#if you're using mailer outside of rails with custom templates path if you already set auto_merge=true all your mailers already merged. +Configuring a Mailer Connection + +If you are using Rails 3,your action_mailer connection would be configured automatically from your config + +For non Rails 3 or if you want to use different mailer configs, you should add the following to your SimpleWorker config: + + config.mailer = { + :address => "smtp.gmail.com", + :port => 587, + :domain => 'gmail.com', + :user_name => GMAIL_USERNAME + :password => GMAIL_PASSWORD + :authentication => 'plain', + :enable_starttls_auto => true} + +Then before you job is run, SimpleWorker will establish the ActionMailer connection. + Merging Gems --------------------- This allows you to use any gem you'd like with SimpleWorker. This uses the same syntax as bundler gem files. @@ -277,9 +294,21 @@ # of if gem requires other directories outside lib merge_gem 'prawn', :include_dirs=>['data'] [Check here for more info on merge_gem](http://support.simpleworker.com/kb/working-with-simpleworker/merging-gems-into-your-worker). + + +Job Timeout +-------------- + +By default, each job has 60 minutes (3600 seconds to complete). If you know that your job should take less than that, you can specify a timeout explicitly: + + worker.queue(:timeout=>1800) + +This will kill your job if it is running more than 1800 seconds, or half an hour. + + Global Merging -------------- If you want to merge items for all of your workers, you can do merges in your SimpleWorker.configure block: