mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-21 20:34:57 +09:00
Some preparation for CRON
This commit is contained in:
1 parent
5365c1b3a8
commit
4c850759ce
2 files changed
+15
-1
No files matched your search
@@ -166,7 +166,7 @@ class Admin extends \Api_Abstract
|
||||
}
|
||||
|
||||
/**
|
||||
* Automatically update all currency rates by Google exchange rates
|
||||
* Automatically update all currency rates.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -499,4 +499,18 @@ class Service implements InjectionAwareInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function onBeforeAdminCronRun(\Box_Event $event)
|
||||
{
|
||||
$di = $event->getDi();
|
||||
$currencyService = $di['mod_service']('currency');
|
||||
|
||||
try {
|
||||
$currencyService->updateCurrencyRates();
|
||||
} catch (\Exception $e) {
|
||||
error_log($e);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user