新增:执行rake任务示例

This commit is contained in:
yystopf 2023-03-23 10:00:14 +08:00
parent e0692bd92a
commit 511cbf4565
1 changed files with 4 additions and 1 deletions

View File

@ -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
desc "batch_add_issues"
desc "Sync Special Commit to Cache"
task :load, [:login, :identifier] => :environment do |t, args|
owner = Owner.find_by(login: args.login)
project = Project.find_by(user_id: owner&.id, identifier: args.identifier)