You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$error = function (int$type, int$realmGUID, int$realmId) : void
33
33
{
34
-
$what = '';
35
-
if ($type == Type::PROFILE)
36
-
$what = 'char';
37
-
if ($type == Type::GUILD)
38
-
$what = 'guild';
39
-
if ($type == Type::ARENA_TEAM)
40
-
$what = 'arena team';
41
-
42
-
DB::Aowow()->query('UPDATE ?_profiler_sync SET status = ?d, errorCode = ?d WHERE realm = ?d AND realmGUID = ?d AND type = ?d', PR_QUEUE_STATUS_ERROR, PR_QUEUE_ERROR_CHAR, $realmId, $realmGUID, $type);
34
+
$what = match ($type)
35
+
{
36
+
Type::PROFILE => 'char',
37
+
Type::GUILD => 'guild',
38
+
Type::ARENA_TEAM => 'arena team'
39
+
};
40
+
41
+
DB::Aowow()->query('UPDATE ?_profiler_sync SET `status` = ?d, `errorCode` = ?d WHERE `realm` = ?d AND `realmGUID` = ?d AND `type` = ?d', PR_QUEUE_STATUS_ERROR, PR_QUEUE_ERROR_CHAR, $realmId, $realmGUID, $type);
43
42
trigger_error('prQueue - '.$what.' #'.$realmGUID.' on realm #'.$realmId.' not found. Truncating local placeholder.', E_USER_WARNING);
44
43
};
45
44
@@ -54,7 +53,7 @@ while (Cfg::get('PROFILER_ENABLE', true))
54
53
usleep($wait * 1000 * 1000);
55
54
}
56
55
57
-
$row = DB::Aowow()->selectRow('SELECT * FROM ?_profiler_sync WHERE status = ?d ORDER BY requestTime ASC', PR_QUEUE_STATUS_WAITING);
56
+
$row = DB::Aowow()->selectRow('SELECT * FROM ?_profiler_sync WHERE `status` = ?d ORDER BY `requestTime` ASC', PR_QUEUE_STATUS_WAITING);
58
57
if (!$row)
59
58
{
60
59
// nothing more to do
@@ -68,20 +67,20 @@ while (Cfg::get('PROFILER_ENABLE', true))
68
67
69
68
if (empty(Profiler::getRealms()[$row['realm']]))
70
69
{
71
-
DB::Aowow()->query('UPDATE ?_profiler_sync SET status = ?d, errorCode = ?d WHERE realm = ?d AND type = ?d AND typeId = ?d', PR_QUEUE_STATUS_ERROR, PR_QUEUE_ERROR_ARMORY, $row['realm'], $row['type'], $row['typeId']);
70
+
DB::Aowow()->query('UPDATE ?_profiler_sync SET `status` = ?d, `errorCode` = ?d WHERE `realm` = ?d AND `type` = ?d AND `typeId` = ?d', PR_QUEUE_STATUS_ERROR, PR_QUEUE_ERROR_ARMORY, $row['realm'], $row['type'], $row['typeId']);
72
71
CLI::write('realm #'.$row['realm'].' for subject guid '.$row['realmGUID'].' is undefined', CLI::LOG_WARN);
73
72
continue;
74
73
}
75
74
else
76
-
DB::Aowow()->query('UPDATE ?_profiler_sync SET status = ?d WHERE realm = ?d AND type = ?d AND typeId = ?d', PR_QUEUE_STATUS_WORKING, $row['realm'], $row['type'], $row['typeId']);
75
+
DB::Aowow()->query('UPDATE ?_profiler_sync SET `status` = ?d WHERE `realm` = ?d AND `type` = ?d AND `typeId` = ?d', PR_QUEUE_STATUS_WORKING, $row['realm'], $row['type'], $row['typeId']);
77
76
78
77
switch ($row['type'])
79
78
{
80
79
case Type::PROFILE:
81
80
if (!Profiler::getCharFromRealm($row['realm'], $row['realmGUID']))
DB::Aowow()->query('DELETE FROM ?_profiler_arena_team WHERE realm = ?d AND realmGUID = ?d', $row['realm'], $row['realmGUID']);
101
+
DB::Aowow()->query('DELETE FROM ?_profiler_arena_team WHERE `realm` = ?d AND `realmGUID` = ?d', $row['realm'], $row['realmGUID']);
103
102
continue2;
104
103
}
105
104
@@ -112,7 +111,7 @@ while (Cfg::get('PROFILER_ENABLE', true))
112
111
$tCycle = microtime(true);
113
112
114
113
// mark as ready
115
-
DB::Aowow()->query('UPDATE ?_profiler_sync SET status = ?d, errorCode = 0 WHERE realm = ?d AND type = ?d AND typeId = ?d', PR_QUEUE_STATUS_READY, $row['realm'], $row['type'], $row['typeId']);
114
+
DB::Aowow()->query('UPDATE ?_profiler_sync SET `status` = ?d, `errorCode` = 0 WHERE `realm` = ?d AND `type` = ?d AND `typeId` = ?d', PR_QUEUE_STATUS_READY, $row['realm'], $row['type'], $row['typeId']);
0 commit comments