webcontextmanager httpgetping
This commit is contained in:
parent
ba7c929dda
commit
598e7af4d5
|
|
@ -5,6 +5,9 @@ Alphaland 2021
|
|||
*/
|
||||
|
||||
//vars
|
||||
|
||||
use Alphaland\Web\WebContextManager;
|
||||
|
||||
$thumbalive = false;
|
||||
$gamealive = false;
|
||||
|
||||
|
|
@ -12,7 +15,7 @@ $gamealive = false;
|
|||
function checkThumb($override)
|
||||
{
|
||||
//thumbnailer check
|
||||
if (httpGetPing($GLOBALS['thumbnailArbiter'], 5000)) //thumb arbiter online
|
||||
if (WebContextManager::HttpGetPing($GLOBALS['thumbnailArbiter'], 5000)) //thumb arbiter online
|
||||
{
|
||||
if (!$GLOBALS['thumbalive'] or $override) //to prevent flooding mysql calls
|
||||
{
|
||||
|
|
@ -35,7 +38,7 @@ function checkThumb($override)
|
|||
function checkGame($override)
|
||||
{
|
||||
//gameserver check
|
||||
if (httpGetPing($GLOBALS['gamesArbiter'], 5000)) //gameserver arbiter online
|
||||
if (WebContextManager::HttpGetPing($GLOBALS['gamesArbiter'], 5000)) //gameserver arbiter online
|
||||
{
|
||||
if (!$GLOBALS['gamealive'] or $override) //to prevent flooding mysql calls
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Alphaland\Moderation {
|
||||
|
||||
use Alphaland\Web\WebContextManager;
|
||||
use PDO;
|
||||
|
||||
class UserModerationManager
|
||||
|
|
@ -62,7 +63,7 @@ namespace Alphaland\Moderation {
|
|||
$discordid->execute();
|
||||
if ($discordid->rowCount() > 0) {
|
||||
$discordid = $discordid->fetch(PDO::FETCH_OBJ)->discordid;
|
||||
httpGetPing("http://localhost:4098/?type=ban&id=".$discordid."&reason=".urlencode($reason), 5000);
|
||||
WebContextManager::HttpGetPing("http://localhost:4098/?type=ban&id=".$discordid."&reason=".urlencode($reason), 5000);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -3506,7 +3506,7 @@ function submitRobloxAssetWorker($requestedassetid, $assettypeid, $assetname, $a
|
|||
|
||||
//discord bot api
|
||||
if ($onsale) {
|
||||
httpGetPing("localhost:4098/?type=itemrelease&assetid=".$newassetid."&name=".urlencode($assetname)."&description=".urlencode($assetdescription)."&price=".$price."&image=".$GLOBALS['renderCDN']."/".getAssetInfo($newassetid)->ThumbHash, 8000);
|
||||
WebContextManager::HttpGetPing("localhost:4098/?type=itemrelease&assetid=".$newassetid."&name=".urlencode($assetname)."&description=".urlencode($assetdescription)."&price=".$price."&image=".$GLOBALS['renderCDN']."/".getAssetInfo($newassetid)->ThumbHash, 8000);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ $alert = '';
|
|||
$alert = "<div class='alert alert-success' role='alert'>Uploaded item</div>";
|
||||
|
||||
if ($onsale) {
|
||||
httpGetPing("localhost:4098/?type=itemrelease&assetid=".$autoincrement."&name=".urlencode($_POST['item'])."&description=".urlencode($_POST['itemdesc'])."&price=".$price."&image=".$GLOBALS['renderCDN']."/".getAssetInfo($autoincrement)->ThumbHash, 8000);
|
||||
WebContextManager::HttpGetPing("localhost:4098/?type=itemrelease&assetid=".$autoincrement."&name=".urlencode($_POST['item'])."&description=".urlencode($_POST['itemdesc'])."&price=".$price."&image=".$GLOBALS['renderCDN']."/".getAssetInfo($autoincrement)->ThumbHash, 8000);
|
||||
}
|
||||
}
|
||||
// ...
|
||||
|
|
@ -281,7 +281,7 @@ $alert = '';
|
|||
$alert = "<div class='alert alert-success' role='alert'>Uploaded face</div>";
|
||||
|
||||
if ($onsale) {
|
||||
httpGetPing("localhost:4098/?type=itemrelease&assetid=".$autoincrement."&name=".urlencode($_POST['item'])."&description=".urlencode($_POST['itemdesc'])."&price=".$price."&image=".$GLOBALS['renderCDN']."/".getAssetInfo($autoincrement)->ThumbHash, 8000);
|
||||
WebContextManager::HttpGetPing("localhost:4098/?type=itemrelease&assetid=".$autoincrement."&name=".urlencode($_POST['item'])."&description=".urlencode($_POST['itemdesc'])."&price=".$price."&image=".$GLOBALS['renderCDN']."/".getAssetInfo($autoincrement)->ThumbHash, 8000);
|
||||
}
|
||||
}
|
||||
// ...
|
||||
|
|
|
|||
Loading…
Reference in New Issue