Skip to content

Commit

Permalink
Added in a task scheduling system similar to delayed-jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed May 18, 2010
1 parent 7cf4775 commit aa601b1
Show file tree
Hide file tree
Showing 30 changed files with 2,638 additions and 402 deletions.
23 changes: 0 additions & 23 deletions app/controllers/catalogue.js

This file was deleted.

34 changes: 0 additions & 34 deletions app/models/book.js

This file was deleted.

8 changes: 8 additions & 0 deletions app/tasks/grabStuff.js
@@ -0,0 +1,8 @@
var sys = require('sys');
exports.GrabStuff = MobiusTask.extend({
frequency: 15000, // milliseconds
execute: function() {
// Your task logic here.
sys.puts('running task.');
}
});
1 change: 1 addition & 0 deletions app/views/partials/awesome.html.mejs
@@ -0,0 +1 @@
Unlimited juice this program is going to be off the hook!
21 changes: 21 additions & 0 deletions config/routes.json
Expand Up @@ -13,6 +13,20 @@
"action" : "index"
},

{
"route" : "/corey",
"method" : "get",
"controller" : "corey",
"action" : "index"
},

{
"route" : "/corey",
"method" : "post",
"controller" : "corey",
"action" : "corey_update"
},

{
"route" : "/catalogue",
"method" : "get",
Expand All @@ -27,6 +41,13 @@
"path" : "documentation/"
},

{
"route" : "/documentation/",
"method" : "get",
"type" : "static",
"path" : "documentation/"
},

{
"route" : "/models/:file",
"method" : "get",
Expand Down
4 changes: 2 additions & 2 deletions config/server.json
@@ -1,3 +1,3 @@
{
"port" : 8080
}
"port" : 8000
}
10 changes: 5 additions & 5 deletions documentation/MEJS.html
Expand Up @@ -34,14 +34,14 @@
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B></B>
<B>mobius-js</B>
</EM>
</TD
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="Helpers.html"><B>PREV CLASS</B></A><!--
&nbsp;<A HREF="Bootstrap.html"><B>PREV CLASS</B></A><!--
NEXT CLASS
-->
&nbsp;<A HREF="MobiusController.html"><B>NEXT CLASS</B></A></FONT></TD>
Expand Down Expand Up @@ -281,14 +281,14 @@ <H3>render</H3>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B></B>
<B>mobius-js</B>
</EM>
</TD
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="Helpers.html"><B>PREV CLASS</B></A><!--
&nbsp;<A HREF="Bootstrap.html"><B>PREV CLASS</B></A><!--
NEXT CLASS
-->
&nbsp;<A HREF="MobiusController.html"><B>NEXT CLASS</B></A></FONT></TD>
Expand Down Expand Up @@ -322,6 +322,6 @@ <H3>render</H3>
<FONT SIZE="-1">

</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Sun May 9 00:47:14 2010</div>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Sat May 15 07:53:00 2010</div>
</BODY>
</HTML>
6 changes: 3 additions & 3 deletions documentation/MobiusController.html
Expand Up @@ -34,7 +34,7 @@
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B></B>
<B>mobius-js</B>
</EM>
</TD
</TR>
Expand Down Expand Up @@ -278,7 +278,7 @@ <H3>render</H3>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B></B>
<B>mobius-js</B>
</EM>
</TD
</TR>
Expand Down Expand Up @@ -319,6 +319,6 @@ <H3>render</H3>
<FONT SIZE="-1">

</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Sun May 9 00:47:14 2010</div>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Sat May 15 07:53:00 2010</div>
</BODY>
</HTML>
103 changes: 96 additions & 7 deletions documentation/MobiusModel.html
Expand Up @@ -34,7 +34,7 @@
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B></B>
<B>mobius-js</B>
</EM>
</TD
</TR>
Expand All @@ -44,7 +44,7 @@
&nbsp;<A HREF="MobiusController.html"><B>PREV CLASS</B></A><!--
NEXT CLASS
-->
&nbsp;<A HREF="MongoDBConnector.html"><B>NEXT CLASS</B></A></FONT></TD>
&nbsp;<A HREF="ProcessingStack.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
Expand Down Expand Up @@ -196,14 +196,48 @@ <H2>Class MobiusModel</H2>
<TD>
<CODE>
<B>
<A HREF="#init">init</A></B>(processingStack)
<A HREF="#init">init</A></B>(&lt;object&gt; processingStack, &lt;class&gt; constructor)
</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Base class for all models.
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
<FONT SIZE="-1">
<CODE>&nbsp;void</CODE>
</FONT>
</TD>
<TD>
<CODE>
<B>
<A HREF="#loadParameters">loadParameters</A></B>(&lt;object&gt; params)
</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Map parameters onto a new instance of this class.
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
<FONT SIZE="-1">
<CODE>&nbsp;Object</CODE>
</FONT>
</TD>
<TD>
<CODE>
<B>
<A HREF="#validate">validate</A></B>(params)
</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Validate parameters.
</TD>
</TR>


</TABLE>

Expand Down Expand Up @@ -354,13 +388,68 @@ <H3>find</H3>

<A NAME="init"><!-- --></A>
<H3>init</H3>
<PRE>void <B>init</B>(processingStack)</PRE>
<PRE>void <B>init</B>(&lt;object&gt; processingStack, &lt;class&gt; constructor)</PRE>

<UL>Base class for all models. Provides CRUD functionality. As of right now,
MongoDB provides the persistent storage. Note: Do not access this method
directly, instead use MobiusModel.extend({});</UL>


<!-- METHOD PARAMETERS START -->

<UL>
<B>Parameters:</B>

<UL><CODE>processingStack</CODE> - synchronous processing stack.
</UL>

<UL><CODE>constructor</CODE> - constructor which can be used to create new instance of this class.
</UL>

</UL>

<!-- METHOD PARAMETERS END -->



<!-- ADDITIONAL ATTRIBUTES START -->

<!-- ADDITIONAL ATTRIBUTES END -->
<HR>

<A NAME="loadParameters"><!-- --></A>
<H3>loadParameters</H3>
<PRE>void <B>loadParameters</B>(&lt;object&gt; params)</PRE>

<UL>Map parameters onto a new instance of this class.</UL>


<!-- METHOD PARAMETERS START -->

<UL>
<B>Parameters:</B>

<UL><CODE>params</CODE> - key value pairs of instance variables.
</UL>

</UL>

<!-- METHOD PARAMETERS END -->



<!-- ADDITIONAL ATTRIBUTES START -->

<!-- ADDITIONAL ATTRIBUTES END -->
<HR>

<A NAME="validate"><!-- --></A>
<H3>validate</H3>
<PRE>Object <B>validate</B>(params)</PRE>

<UL>Validate parameters.</UL>


<!-- METHOD PARAMETERS START -->

<!-- METHOD PARAMETERS END -->
Expand Down Expand Up @@ -397,7 +486,7 @@ <H3>init</H3>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B></B>
<B>mobius-js</B>
</EM>
</TD
</TR>
Expand All @@ -407,7 +496,7 @@ <H3>init</H3>
&nbsp;<A HREF="MobiusController.html"><B>PREV CLASS</B></A><!--
NEXT CLASS
-->
&nbsp;<A HREF="MongoDBConnector.html"><B>NEXT CLASS</B></A></FONT></TD>
&nbsp;<A HREF="ProcessingStack.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
Expand Down Expand Up @@ -438,6 +527,6 @@ <H3>init</H3>
<FONT SIZE="-1">

</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Sun May 9 00:47:14 2010</div>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Sat May 15 07:53:00 2010</div>
</BODY>
</HTML>

0 comments on commit aa601b1

Please sign in to comment.