One file for each domain, both www.example.com and example.com need separate files:
{
"applinks": {
"apps": [],
"details": {
"9JA89QQLNQ.com.apple.wwdc": {One file for each domain, both www.example.com and example.com need separate files:
{
"applinks": {
"apps": [],
"details": {
"9JA89QQLNQ.com.apple.wwdc": {What this guide will cover: the code you will need in order to include Redis and Resque in your Rails app, and the process of creating a background job with Resque.
What this guide will not cover: installing Ruby, Rails, or Redis.
Note: As of this writing I am still using Ruby 1.9.3p374, Rails 3.2.13, Redis 2.6.11, and Resque 1.24.1. I use SQLite in development and Postgres in production.
Background jobs are frustrating if you've never dealt with them before. Over the past few weeks I've had to incorporate Redis and Resque into my projects in various ways and every bit of progress I made was very painful. There are many 'gotchas' when it comes to background workers, and documentation tends to be outdated or scattered at best.
| # Start a worker with proper env vars and output redirection | |
| def run_worker(queue, count = 1) | |
| puts "Starting #{count} worker(s) with QUEUE: #{queue}" | |
| ops = {:pgroup => true, :err => [(Rails.root + "log/workers_error.log").to_s, "a"], | |
| :out => [(Rails.root + "log/workers.log").to_s, "a"]} | |
| env_vars = {"QUEUE" => queue.to_s} | |
| count.times { | |
| ## Using Kernel.spawn and Process.detach because regular system() call would | |
| ## cause the processes to quit when capistrano finishes | |
| pid = spawn(env_vars, "rake resque:work", ops) |
| window.cookies = { | |
| set: function(name, value, days) { | |
| if (name) { | |
| if (days) { | |
| var date = new Date(); | |
| date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); | |
| var expires = "; expires=" + date.toGMTString(); | |
| } | |
| else { | |
| var expires = ""; |