Recall to API And reserve nodes [php-graphene-node-client v2.3.2]

It is updated to solve error answers from API

WSConnectorAbstract.php was updated

  • possibility to recall to API when getting error in answer (default $maxNumberOfTriesToCallApi = 3)
  • possibility to connetc to reserve nodes (after $maxNumberOfTriesToCallApi tries recall you can connect to reserve nodes)

Use

<?php

namespace My\App\Commands;

use GrapheneNodeClient\Commands\DataBase\CommandAbstract;
use GrapheneNodeClient\Connectors\ConnectorInterface;

class GolosWSConnector extends WSConnectorAbstract
{
    /**
     * @var string
     */
    protected $platform = self::PLATFORM_GOLOS;

    /**
     * max number of tries to get answer from the node
     *
     * @var int
     */
    protected $maxNumberOfTriesToCallApi = 3;

    /**
     * wss or ws servers, can be list. First node is default, other are reserve.
     * After $maxNumberOfTriesToCallApi tries connects to default it is connected to reserve node.
     *
     * @var string|array
     */
    protected $nodeURL = ['wss://ws.golos.io', 'wss://api.golos.cf'];
}



Github or packagist with MIT license. Author @t3ran13

It is better with each commit

@transisto add it to steemtools.com please

Sort:  

Calling @originalworks :)
img credz: pixabay.com
Nice, you got a 6.0% @minnowbooster upgoat, thanks to @t3ran13
Want a boost? Minnowbooster's got your back!

The @OriginalWorks bot has determined this post by @php-node-client to be original material and upvoted it!

ezgif.com-resize.gif

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
For more information, Click Here!
Special thanks to @reggaemuffin for being a supporter! Vote him as a witness to help make Steemit a better place!

Congratulations @php-node-client! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You made your First Comment
Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

What a good content!..
Greeeat :)

Congratulations @php-node-client! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!