mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:15:13 +00:00
review check_cron_broken()
This commit is contained in:
parent
017379a2db
commit
42994cf1ae
2 changed files with 9 additions and 9 deletions
|
@ -18,6 +18,6 @@ Guest Pass: Provide special guest access to private resources and media - on you
|
|||
|
||||
Friend Zoom: Set your degree of closeness to any connection and then interactively zoom in to filter your stream to close friends; or zoom out to see posts by casual acquaintances.
|
||||
|
||||
Delivery Reports: Allows you to determine what happened to your post or comment and where it actually went once you published it.
|
||||
Delivery Reports: In a decentralised multi-platform world, stuff happens. Sites and networks sometimes go down. Project developers sometimes introduce bugs and incompatibilities. This allows you to determine what happened to your post or comment and where it actually went once you published it.
|
||||
|
||||
Failsafe: Because the best time to have a current backup of your data is 10 seconds ago. Clone your online identity and content to multiple sites using the Nomad protocol and mirror any changes in near realtime. Then if your chosen site goes down (either temporarily or permanently) or you get booted off of it for some reason, your online life doesn't have to come to an end or force you to start over. All your friends and all your content are available on any of your cloned instances - at any time.
|
16
boot.php
16
boot.php
|
@ -2498,28 +2498,28 @@ function cert_bad_email() {
|
|||
*/
|
||||
function check_cron_broken() {
|
||||
|
||||
$d = get_config('system','lastcron');
|
||||
$d = get_config('system', 'lastcron');
|
||||
|
||||
if((! $d) || ($d < datetime_convert('UTC','UTC','now - 4 hours'))) {
|
||||
if((! $d) || ($d < datetime_convert(datetime: 'now - 4 hours'))) {
|
||||
Run::Summon( [ 'Cron' ] );
|
||||
set_config('system','lastcron',datetime_convert());
|
||||
set_config('system', 'lastcron', datetime_convert());
|
||||
}
|
||||
|
||||
$t = get_config('system','lastcroncheck');
|
||||
$t = get_config('system', 'lastcroncheck');
|
||||
if(! $t) {
|
||||
// never checked before. Start the timer.
|
||||
set_config('system','lastcroncheck',datetime_convert());
|
||||
set_config('system', 'lastcroncheck', datetime_convert());
|
||||
return true;
|
||||
}
|
||||
|
||||
if($t > datetime_convert('UTC','UTC','now - 3 days')) {
|
||||
if($t > datetime_convert(datetime: 'now - 3 days')) {
|
||||
// Wait for 3 days before we do anything so as not to swamp the admin with messages
|
||||
return true;
|
||||
}
|
||||
|
||||
set_config('system','lastcroncheck',datetime_convert());
|
||||
set_config('system', 'lastcroncheck', datetime_convert());
|
||||
|
||||
if(($d) && ($d > datetime_convert('UTC','UTC','now - 3 days'))) {
|
||||
if(($d) && ($d > datetime_convert(datetime: 'now - 3 days'))) {
|
||||
// Scheduled tasks have run successfully in the last 3 days.
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue