twinge / panda forked from newbamboo/panda

Video encoding made easy with AWS

This URL has Read+Write access

Josh Starcher (author)
Mon Jul 06 11:13:32 -0700 2009
commit  dd0fa7cb8d832995e5ff6cb085c770525d36a143
tree    7fd200156b9c01665cf5cc800036f390157fa4e6
parent  5f3f4fa2bd974553d08981a6e301033b89e01eb7
panda / encoder.god
100644 36 lines (32 sloc) 0.915 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
God.watch do |w|
  w.name = "encoder"
  current_path = "/var/www/panda/current"
  port = 4091
  w.start = "/bin/bash -c 'cd #{current_path}; merb -r bin/encoder.rb -d -p #{port} -e encoder'" # -P log/merb.#{port}.pid'
  w.stop = "/bin/bash -c 'cd #{current_path}; merb -k #{port}'"
  w.behavior(:clean_pid_file)
  w.start_grace = 10.seconds
  w.restart_grace = 10.seconds
  
  w.start_if do |start|
    start.condition(:process_running) do |c|
      c.interval = 10.seconds
      c.running = false
      c.notify = 'admin'
    end
  end
end
 
God::Contacts::Email.message_settings = {
  :from => 'admin@gcxencoder.org'
}
 
# God::Contacts::Email.server_settings = {
# :address => "localhost",
# :port => 25,
# :domain => "pandastream.com"
# # :authentication => :plain,
# # :user_name => "john",
# # :password => "s3kr3ts"
# }
 
God.contact(:email) do |c|
  c.name = 'Josh'
  c.email = 'josh@26am.com'
end