Code Monkey home page Code Monkey logo

Comments (3)

timbrigham-oc avatar timbrigham-oc commented on June 12, 2024

Ok, some additional data. The repeated calls to the operations and summary API endpoints only happen if you navigate to the operations page, then select an operation off the dropdown menu. If you delete a record or otherwise don't have one already selected the constant reloading doesn't occur.

I've also cut the amount of data it's trying to pull back every time from the operations endpoint somewhat by culling old records I don't need any longer.

from caldera.

timbrigham-oc avatar timbrigham-oc commented on June 12, 2024

Yeah, the overall bandwidth requirement was due in large part to the amount of data returned from the api/v2/operations endpoint combined with a crazy fast polling period. Since I'm still testing this out I had hundreds of test iterations, some of which with hundreds of individual lines. It was like 10 megabytes each time it gets called and easily a hundred times in a minute.

I used some PS scripting to bulk remove (what happened to being able to kill YML files??) that makes the console usable again.

$API_KEY = "xxxxxxxxxxxxxxxxxxxx"
$uri = "https://xxxxxxxxxxxxxxxxxxxxxxxx/api/v2/operations"
$headers = @{
    KEY = $API_KEY
}
$operations = Invoke-RestMethod -Uri $uri -Method GET -Headers $headers

foreach ( $operation in $operations ) {
    # if the operation name field contains the word "test" then remove it 
    #if ($operation.name -match "test") {
    write-output "Removing $($operation.name)"
    $opToRemove = $operation.id 
    $uri = "https://xxxxxxxxxxxxxx/api/v2/operations/$opToRemove"
    Invoke-RestMethod -Uri $uri -Method DELETE -Headers $headers
    write-output ==========
    #}
    #$operation.id 
}

from caldera.

timbrigham-oc avatar timbrigham-oc commented on June 12, 2024

There's an issue with the operations API endpoint returning a ton of data and having a fast polling cycle in the current Magma release.. I've addressed it on my local instance in MAGMA#51. Long term fix should be a process that only polls changes IMO.

from caldera.

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.