Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

suhlig/delayed-job-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testing delayed_job

Preparation

  1. Start Postgres and create the database:

    brew services start postgresql
    createdb delayed-job-test
  2. Configure the database connection:

    export DB=postgres:///delayed-job-test
  3. Run migrations:

    sequel -m db/migrations $DB
  4. Start the job processing daemon:

    ./scripts/process-jobs run

On a Happy Day

  1. Provide the mail body on STDIN and the email addresses as parameters:

    echo "Dear number $RANDOM, you are an awesome number! Best regards; The Computer." | ./scripts/enqueue-job foo@example.com bar@example.org

    Here, we are sending a letter to foo@example.com and bar@example.org, each as a single job.

  2. Verify that the mailer ran (we simulate it by appending to a 'queue' file):

    tail -f log/mail.queue

    Additional details about the job itself can be found in log/delayed_job.log.

About

Testing the delayed_job library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages