From 0cc94c65a8724541fcb48d26e3c592dafdeec13e Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Tue, 8 May 2012 21:14:57 +0800 Subject: [PATCH] Patch from ldap: Test version for DB sync schedule job --- app/jobs/sync_db.rb | 10 ++++++++-- config/resque_schedule.yml | 16 ++++++++-------- dump.rdb | Bin 816 -> 1530 bytes 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/jobs/sync_db.rb b/app/jobs/sync_db.rb index f6458204f..d4bda7901 100644 --- a/app/jobs/sync_db.rb +++ b/app/jobs/sync_db.rb @@ -3,7 +3,13 @@ class SyncDb @queue = :high def self.perform() -# sleep 10 - puts "DB Sync" + self.start_sync + end + + def self.start_sync + task = 'mid_site:sync' + args = [] + %x[rake #{task} --trace >> #{Rails.root}/log/rake.log] + puts "SyncDb Synced" end end diff --git a/config/resque_schedule.yml b/config/resque_schedule.yml index 1f4918987..6929152e6 100644 --- a/config/resque_schedule.yml +++ b/config/resque_schedule.yml @@ -1,17 +1,17 @@ -do_mail_matt: - every: 10s - class: FetchTime - args: - description: Runs the perform method in FetchTime +# do_mail_matt: +# every: 10s +# class: FetchTime +# args: +# description: Runs the perform method in FetchTime nccu_daily_ldap_sync: cron: * * [0,12] * * * class: SyncDb args: - description: Runs the perform method in SnycDB + description: Sync NCCU middle site with Orbit for LDAP data nccu_claender_sync: - every: 1m + cron: * * [0,12] * * * class: NccuCalendar args: - description: Runs the perform method in NccuCalendar \ No newline at end of file + description: Sync NCCU calendar RSS Feeds \ No newline at end of file diff --git a/dump.rdb b/dump.rdb index a4a56dc0cba0b3124f374e1d3dba72ac23f09bae..a3c1b42c46ad075453c0ee3cb39529b5802dd944 100644 GIT binary patch literal 1530 zcmbW1PjA~s5XC9_PmRQZn*xE0wunb-z)k{LT+$LP5iMdvc7q-o6mf#0DI94@jwRYl zF0)+9c8U~6i=6T$dhQ|T+^QhoB8NagZn^Z(dt1tqBclLy=#ev=d4u0oFxfy$k(X6&ix=nQX)*Yv(k@y zPxULK9cLqnKHUl0ovCb6`()He6jRPV3po0{qW0;i`eB(D)OVg(wz_p?1QJK=))#2INoX=bPapX(Xluy7^g zyF~EV!&n6(f~EN_*-k@@)Q*%w!it8ikCq&wWPm;>0iHyr5WdU60^uH@r{E}PbERb;0~(?@ zmzUv&1suD`lbb;9P5a2PU3}A@d!}y-&s)Bf7~h_JFXUkoBY8h#2;F6Axw|aHVZ3A%ZyF74^dSq7ap*D`Fqb1_2!uF@*N0a2%1PBs zU{7C#eONqg>rR7jb}yC4IBxl$xHHSnXd0WQA*_6GZEoaRVr)KI$XpvFYoEoMSqFUf c+`2C{+8D>fC~#&#Z$d=hpr6FTfG)_y7O^ delta 156 zcmeyxy@9Ph$koL&*ucQR@E-#cUr}mtVQH#Wd45rLYEdzxKyG45iEd(Mk(HUTsi~!v z7K0j!3M+JZtKyQxqLS1UNh1S8BV7YiT>}dRLsKhbBP(M=1#JTh0|Q1ys0qQz8L26y fITNLm7)2&NkeE2Fj){w9;seRe`iyfJ8UF(SGDa}@