Adding a startup module makes other modules to not run

35 views
Skip to first unread message

Danielo Rodríguez

unread,
May 29, 2015, 1:28:39 PM5/29/15
to tiddly...@googlegroups.com
Hello,

I'm experiencing a weird behavior that took me some time to figure out.

The problem as follows:
I had two startup modules. Then I added a third module and one of the other two modules stopped working suddenly. I ca'nt figure why, but maybe is because I am not setting the order properly? Here is how they are configured:

// Export name and synchronous status
exports.name = "pouchdb-sycer";
exports.after = ["pouchdb"];
exports.platforms = ["browser"];
exports.synchronous = false;



// Export name and synchronous status
exports.name = "pouchdb";
exports.before = ["startup"];
exports.platforms = ["browser"];
exports.synchronous = true;



This below is the problematic one


exports.name = "pouchdb-utils";
exports.after = ["pouchdb"];
exports.before = ["pouchdb-sycer"];
exports.platforms = ["browser"];
exports.synchronous = false;

Could be because two of them are asynchronous?

Thanks for any help

Jeremy Ruston

unread,
May 29, 2015, 1:33:44 PM5/29/15
to tiddly...@googlegroups.com, tiddly...@googlegroups.com
Hi Danielo

Are you invoking the callback at the end of your asynchronous startup?

Best wishes

Jeremy


--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/f9f32162-6c06-4348-b3e1-d9948cb6b560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Danielo Rodríguez

unread,
May 29, 2015, 3:33:55 PM5/29/15
to tiddly...@googlegroups.com
Hello Jeremy,

No I'm not. Does the startup module receive a callback? What does that callback expect? I removed the asynchronous from the "utils" module and the problem is gone. Anyway, I want to know more about asynchronous startup modules to do things the right way. I looked into tw/dev but I miss some information. I feel like there were more information available before.

Danielo Rodríguez

unread,
May 30, 2015, 12:27:34 PM5/30/15
to tiddly...@googlegroups.com
Hello Jeremy,

I have checked again the documentation at TW/dev and it is mentioned that you have to call the callback on non-synchronous modules, but it does say nothing about what parameters does it expect. Could you please provide me a clue?

Many thanks.

PD: The original issue is resolved.
Reply all
Reply to author
Forward
0 new messages