Giter Site home page Giter Site logo

Project Object about nexrender HOT 3 CLOSED

inlife avatar inlife commented on August 22, 2024
Project Object

from nexrender.

Comments (3)

inlife avatar inlife commented on August 22, 2024

how can you what ?

from nexrender.

shivyan-javascript-engineer avatar shivyan-javascript-engineer commented on August 22, 2024

I'm using this code for render node...

api.get().then(function(results) {
// console.log(results);
// iterate, find queued
console.log(typeof results);
for (let project in results) {
// console.log(results);
if (results[project].state === 'queued') {

      console.log(typeof results[project]);
      var worker = cluster.fork();
      // console.log(results[project]);
        worker.send(project);

    }
  }
});

But after sending the project to the cluster fork...It changes its structure ....to

{ uid: 'shivy8r828dfjg6s4u02',
state: 'queued',
template: 'PROJECT_TEST_05.aepx',
composition: 'PROJECT_TEST_05',
type: 'default',
assets:
[ { type: 'project',
src: '//MAC_05/share/assets/PROJECT_TEST_05.aepx',
name: 'PROJECT_TEST_05.aepx' },
{ type: 'image',
src: '//MAC_05/share/assets/001.jpg',
name: '001.jpg' }............

But the original was before sending to fork was this...

Project {
uid: 'shivy8r828dfjg6s4u02',
state: 'queued',
template: 'PROJECT_TEST_05.aepx',
composition: 'PROJECT_TEST_05',
type: 'default',
assets:
[ { type: 'project',
src: '//MAC_05/share/assets/PROJECT_TEST_05.aepx',
name: 'PROJECT_TEST_05.aepx' },
{ type: 'image',
src: '//MAC_05/share/assets/001.jpg',
name: '001.jpg' },
{ type: 'image',.....

...So how can I revert it to previous state ...the state in which whole object in wrapped under name Project...Even if the original object is converted in JSON then parsed back in to js object it removes Project at the beginning thus my render is failing....

from nexrender.

inlife avatar inlife commented on August 22, 2024

seems like it is loosing the object form, cuz actually its a instance of Project class. Maybe you can try to recreate it somehow ?

from nexrender.

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.