-
Notifications
You must be signed in to change notification settings - Fork 228
/
Copy pathminutly.php
85 lines (68 loc) · 2.45 KB
/
minutly.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
require_once("classes/config.php");
require_once("classes/payed.php");
require_once("classes/pay_place.php");
require_once("classes/commune.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php");
require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/user_content.php');
require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/wallet/walletAlpha.php');
require_once("classes/log.php");
//#0027582 Êàæäóþ ìèíóòó îáðàáàòûâàòü çàïðîñû íà ðàçìåøåíèå â êàðóñåëè
pay_place::cronRequest();
// Êàæäûå ïîë ÷àñà îáíîâëÿåì ñòàòóñ ðàññûëîê
if(date('i') == 30) {
require_once("classes/mailer.php");
$mailer = new mailer();
$mailer->updateStatusSending();
}
// íî÷íûå íåñòûêîâêè âî âðåìåíè ïðè ïåðåõîäå â ñëåäóþùèé äåíü #0021788
if(!in_array((int) date('Hi'), array(2358, 2359))) {
payed::UpdateProUsers();
}
//@todo: íåïîíÿòíî äëÿ ÷åãî?
//åñëè þçåð ïðîâèñåë 10 ñåê ñ ìîìåíòà ïóáëèêàöèè
//òî ïîìå÷àåì åãî êàê ïðîñìîòðåííûé õîòÿ åãî ìîã íèêòî è íåóâèäåòü!
$pp = new pay_place();
$pp->getDoneShow(0);
$user_content = new user_content();
$user_content->releaseDelayedStreams();
$user_content->getQueueCounts();
$user_content->getStreamsQueueCounts();
if (date('i') % 5 == 0) {
walletAlpha::checkProgressOrders();
}
// Êàæäûå 20 ìèíóò ïåðåñ÷èòûâàåì ñ÷åò÷èêè îñòàëüíûõ ñîîáùåñòâ
if (date('i') % 20 == 0) {
commune::recalcThemesCountCommunes(null, commune::COMMUNE_BLOGS_ID);
}
if (date('i') % 15 == 0) {
// ïðîâåðêà ñòàòóñîâ ïëàòåæåé paymaster ïðè âîçâðàòå
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/pmpay.php");
$pm = new pmpay();
if(DEBUG) {
$pm->setDebugUrl($GLOBALS['host'].'/norisk2/admin/pm-server-test.php');
}
$pm->checkRefund();
}
if(SERVER === 'release') {
/*
* @todo: https://beta.free-lance.ru/mantis/view.php?id=29134#c87337
*
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/qiwipay.php");
$qiwipay = new qiwipay();
$qiwipay->checkBillsStatus($error);
*/
if (date('i') % 10 == 0) {
// ïðîâåðêà ñòàòóñîâ ïëàòåæåé paymaster
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/pmpay.php");
$pm = new pmpay();
$pm->checkInvoiced();
}
}
// çàïóñêàåòñÿ â 0 è 1 ìèíóòó êàæäîãî ÷àñà ñ íà÷àëà ñóòîê äî 5 óòðà
if(date('i') == 0 && date('H') >= 0 && date('H') <= 5) {
$log = new log('minutly/'.SERVER.'-%d%m%Y[%H].log', 'w');
// ðàçìîðîçêà ÏÐÎ
$log->TRACE( payed::freezeUpdateProUsers() );
}
professions::autoProlongSpecs();