mirror of
https://github.com/plashchynski/crono.git
synced 2026-01-13 22:03:27 +01:00
[PR #36] [MERGED] Add the possibility to schedule jobs with arguments #84
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/plashchynski/crono/pull/36
Author: @jannishuebl
Created: 1/14/2016
Status: ✅ Merged
Merged: 1/16/2016
Merged by: @plashchynski
Base:
master← Head:jhuebl_add_data_to_scheduled_job_20160113📝 Commits (3)
dd4f92badd data to Cron.perform which will be passed to ExampleJob.new(data).perform89f3b9achange to args which will be passed to Job#perform0422289document how to schedule jobs with arguments📊 Changes
7 files changed (+55 additions, -17 deletions)
View changed files
📝
README.md(+9 -2)📝
lib/crono/job.rb(+5 -4)📝
lib/crono/performer_proxy.rb(+5 -4)📝
lib/generators/crono/install/templates/migrations/create_crono_jobs.rb(+1 -0)📝
spec/job_spec.rb(+25 -3)📝
spec/performer_proxy_spec.rb(+6 -0)📝
spec/scheduler_spec.rb(+4 -4)📄 Description
I implemented the possibility to schedule jobs with arguments which will be persisted using JSON.
The use without arguments is still possible, but users have to run a migration which adds a text column to crono_jobs table.
Arguments can be set as following:
For a Job like:
I hope this change is conform with your idea of the project, if there is some problem please let me know.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.