Fix bug.
This commit is contained in:
parent
00897951b1
commit
7f3bbe7948
|
@ -941,7 +941,7 @@ module FguSyncPlugin
|
|||
end
|
||||
|
||||
end
|
||||
namespace :sync_nccu_personal_plugins do
|
||||
namespace :sync_fgu_personal_plugins do
|
||||
task :sync,[:uid] => :environment do |task,args|
|
||||
#require "#{ENV['PWD']}/app/models/member_profile" #it will cause circular dependency
|
||||
FguSyncPlugin.init
|
||||
|
|
|
@ -34,8 +34,8 @@ if bundle_update_flag
|
|||
puts "Installing tiny_tds gem ..."
|
||||
bundler_with_clean_env{ system("gem install tiny_tds -- '--with-freetds-dir=#{home_path}/freetds-1.1.24_build'") }
|
||||
end
|
||||
crontab_sync = `crontab -l|grep 'bundle exec rake sync_nccu_personal_plugins:sync'|grep #{ENV['PWD']}`
|
||||
sync_cron="0 0 * * * /bin/bash -l -c 'cd #{ENV['PWD']} && bundle exec rake sync_nccu_personal_plugins:sync > /dev/null'"
|
||||
crontab_sync = `crontab -l|grep 'bundle exec rake sync_fgu_personal_plugins:sync'|grep #{ENV['PWD']}`
|
||||
sync_cron="0 0 * * * /bin/bash -l -c 'cd #{ENV['PWD']} && bundle exec rake sync_fgu_personal_plugins:sync > /dev/null'"
|
||||
crontab_sync_jobs = crontab_sync.split("\n")
|
||||
if crontab_sync_jobs.count == 0
|
||||
%x(CRON="#{sync_cron}" && (crontab -l; echo "$CRON" ) | crontab -)
|
||||
|
|
Loading…
Reference in New Issue