新增:执行rake任务示例
This commit is contained in:
parent
e0692bd92a
commit
511cbf4565
|
@ -1,5 +1,8 @@
|
||||||
|
# 执行示例 bundle exec rake "special_commit:load[yystopf, pig]"
|
||||||
|
# RAILS_ENV=production bundle exec rake "special_commit:load[yystopf, pig]"
|
||||||
|
#
|
||||||
namespace :special_commit do
|
namespace :special_commit do
|
||||||
desc "batch_add_issues"
|
desc "Sync Special Commit to Cache"
|
||||||
task :load, [:login, :identifier] => :environment do |t, args|
|
task :load, [:login, :identifier] => :environment do |t, args|
|
||||||
owner = Owner.find_by(login: args.login)
|
owner = Owner.find_by(login: args.login)
|
||||||
project = Project.find_by(user_id: owner&.id, identifier: args.identifier)
|
project = Project.find_by(user_id: owner&.id, identifier: args.identifier)
|
||||||
|
|
Loading…
Reference in New Issue