Code Monkey home page Code Monkey logo

Comments (4)

derrickmehaffy avatar derrickmehaffy commented on July 25, 2024

Have asked @purrcat#3019 to take a look at this to see if it can be done in python and called using the strapi cron script.

from capiv2-strapi.

derrickmehaffy avatar derrickmehaffy commented on July 25, 2024

@purrcat259 for the arg parsing:

There are 3 different environments:

  • development
  • staging
  • production

The files are located in the following 3 directories (database.json not database.json.example)
https://github.com/canonn-science/CAPIv2-Strapi/blob/development/config/environments/development/database.json.example (config/environments/development/database.json)

https://github.com/canonn-science/CAPIv2-Strapi/blob/development/config/environments/staging/database.json.example (config/environments/staging/database.json)

https://github.com/canonn-science/CAPIv2-Strapi/blob/development/config/environments/production/database.json.example (config/environments/production/database.json)

The following is what we need to grab:

  •     "host": "127.0.0.1",
    
  •     "port": 3306,
    
  •     "database": "exampledatabase",
    
  •     "username": "exampleuser",
    
  •     "password": "examplepassword"
    

Obviously in this script the table name systems is static. So for passing arguments to the script file something like:

python3 system_update_edsm.py development
python3 system_update_edsm.py staging
python3 system_update_edsm.py production

from capiv2-strapi.

derrickmehaffy avatar derrickmehaffy commented on July 25, 2024

After we get the systems script done, then I can pass along the info for the bodies (which will be much much larger and a tad more complex)

from capiv2-strapi.

derrickmehaffy avatar derrickmehaffy commented on July 25, 2024

Script created and runs on each new system added. A new issue will be opened for the cron task

from capiv2-strapi.

Related Issues (20)

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.