GithubHelp home page GithubHelp logo

kit-api's Introduction

platform-api

API layer for OST Platform.

Setup

Install all the Gems.

bundle install

Start the MySQL server.

mysql.server start

Start Memcache

memcached -p 11211 -d

Source the ENV vars.

source set_env_vars.sh

Drop existing tables and databases if any. CAUTION.

rake db:drop:all

Create all the databases.

rake db:create:all

Run all the migrations.

rake db:migrate

Start Redis

redis-server --port 6379  --requirepass 'st123'

Start Sidekiq

source set_env_vars.sh
sidekiq -C ./config/sidekiq.yml -q sk_api_high_task  -q sk_api_med_task -q sk_api_default

Start Rails

> bundle install
> source set_env_vars.sh
> rails s -p 4001

Run the following steps in order to de-link a token and client.

  1. Select all 'non-deployed' tokens from tokens table.
    select * from tokens where status != 1; 
  2. Set client_id for all the tokens as NULL. If you need to de-link only a particular token, please update the query accordingly.
    UPDATE `tokens` SET client_id_was = client_id, client_id = NULL, debug = ('{\"disassociation_reason\":\"Token holder in openst.js v0.10.0-beta.1 had wrong callprefix for executeTransaction and executeRedemption.\"}'), updated_at='2019-03-27 00:32:03.569' WHERE (status != 1);
  3. Select all workflows where workflow kind is 'tokenDeployKind'.
    select * from workflows where kind = 1;
  4. Set unique_hash as NULL. If you need to de-link only a particular token, please update the query accordingly.
    update workflows set unique_hash = NULL where kind = 1;
  5. For all client ids which have been been impacted we would need to unset demo economy setup related bits according to the sub env
     fail if affected_client_ids.blank?
     clients = Client.where(id: affected_client_ids).all
     clients.each do |client|
       if GlobalConstant::Base.main_sub_environment?  
         client.send("unset_#{GlobalConstant::Client.mainnet_test_economy_qr_code_uploaded_status}")
         client.send("unset_#{GlobalConstant::Client.mainnet_registered_in_mappy_server_status}")
       else
         client.send("unset_#{GlobalConstant::Client.sandbox_test_economy_qr_code_uploaded_status}")
         client.send("unset_#{GlobalConstant::Client.sandbox_registered_in_mappy_server_status}")
       end
       client.save!
     end

kit-api's People

Contributors

akshayraje avatar alpeshvmodi avatar aman-barbaria avatar anaghamurtarkar avatar ankitsingh2099 avatar ashutoshlodhi avatar benjaminbollen avatar bitsnacker avatar kedarchandrayan avatar puneet-khushwani-eth avatar shlokgilda avatar tejas-sangani avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ostdotcom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.