Skip to content

Commit

Permalink
NIT fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensayshi committed Aug 18, 2021
1 parent 25665f8 commit 2e4d7c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions tools/update-items-from-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,19 @@ function processApiData($API_JSON, $offset)

echo "{$itemCount}: {$APIItem->getName()} (ID: {$APIItem->getItemId()})\n";

$itemData = array('TypeId' => getOrCreateTypeID($APIItem->getMarketType()),
$itemData = array(
'TypeId' => getOrCreateTypeID($APIItem->getMarketType()),
'DataId' => $APIItem->getItemId(),
'Name' => $APIItem->getName(),
'TpName' => $APIItem->getName(),
'RestrictionLevel' => $APIItem->getLevel(),
'Rarity' => getRarityID($APIItem->getRarity()),
'VendorSellPrice' => $APIItem->getVendorValue(),
'Img' => $APIItem->getImageURL(),
'RarityWord' => $APIItem->getRarity(),
'UnsellableFlag' => $APIItem->isUnsellable());
'UnsellableFlag' => $APIItem->isUnsellable(),
'GemStoreDescription' -> "",
);

$item = ItemQuery::create()->findPK($APIItem->getItemId());

Expand Down
4 changes: 2 additions & 2 deletions vendor/php-multi-curl/EpiCurl.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ public function getResult($key = null)
$innerSleepInt = $outerSleepInt = 1;
while($this->running && ($this->execStatus == CURLM_OK || $this->execStatus == CURLM_CALL_MULTI_PERFORM))
{
usleep($outerSleepInt);
if ($outerSleepInt > 0) usleep($outerSleepInt);
$outerSleepInt *= $this->sleepIncrement;
$ms=curl_multi_select($this->mc);
if($ms >= 0)
{
do{
$this->execStatus = curl_multi_exec($this->mc, $this->running);
usleep($innerSleepInt);
if ($innerSleepInt > 0) usleep($innerSleepInt);
$innerSleepInt *= $this->sleepIncrement;
}while($this->execStatus==CURLM_CALL_MULTI_PERFORM);
$innerSleepInt = 1;
Expand Down

0 comments on commit 2e4d7c8

Please sign in to comment.