BusyBird-Input-Feed

 view release on metacpan or  search on metacpan

t/samples/stackoverflow.atom  view on Meta::CPAN


<pre><code>from __future__ import absolute_import
import os
import sys
import djcelery
from celery.schedules import crontab


djcelery.setup_loader()

INSTALLED_APPS = (
    ..
    ...
    'my_app',
    'djcelery',
    'celeryApp',
)

BROKER_URL = "amqp://user:password@localhost:5672/v_host"

## celery configrations 

CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_ACCEPT_CONTENT=['json']
CELERY_TIMEZONE = 'Asia/Kolkata'
CELERY_ENABLE_UTC = True

CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend'
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'

## These config can be commented in production

CELERY_BIN = "/usr/local/bin/celery"
CELERYD_NODES = "worker1 worker2 worker3"
CELERYD_CHDIR="/home/user/proj/"
CELERYD_OPTS="--time-limit=300 --concurrency=8"
CELERYD_USER="celery"
CELERYD_GROUP="celery"
CELERY_CREATE_DIRS=1


CELERY_IMPORTS = ('celeryApp.tasks',)
</code></pre>

<p>My directory structure is :</p>

<p>myProj > my_app ,__init__.py, setting.py, celeryProj.py
 myProj > celeryApp > tasks.py</p>

<p>I am getting this error log: </p>

<p>[2014-07-06 10:17:43,674: ERROR/MainProcess] Received unregistered task of type u'celeryApp.tasks.add'.
The message has been ignored and discarded.</p>

<p>Did you remember to import the module containing this task?
Or maybe you are using relative imports?
Please see <a href="http://bit.ly/gLye1c" rel="nofollow">http://bit.ly/gLye1c</a> for more information.</p>

<p>The full contents of the message body was:
{u'utc': True, u'chord': None, u'args': [2, 2], u'retries': 0, u'expires': None, u'task': u'celeryApp.tasks.add', u'callbacks': None, u'errbacks': None, u'timelimit': [No...
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 455, in on_task_received
    strategies[name](message, body,
KeyError: u'celeryApp.tasks.add'</p>

        </summary>
    </entry>
    <entry>
        <id>http://stackoverflow.com/q/24592910</id>
        <re:rank scheme="http://stackoverflow.com">0</re:rank>
        <title type="text">Adding a date variable to alter table</title>
            <category scheme="http://stackoverflow.com/tags" term="sql" />
            <category scheme="http://stackoverflow.com/tags" term="sql-server" />
        <author>
            <name>user3166881</name>
            <uri>http://stackoverflow.com/users/3166881</uri>
        </author>
        <link rel="alternate" href="http://stackoverflow.com/questions/24592910/adding-a-date-variable-to-alter-table" />
        <published>2014-07-06T05:12:45Z</published>
        <updated>2014-07-06T05:30:09Z</updated>
        <summary type="html">
            

            &lt;p&gt;I am trying to alter a temp table by adding a &quot;Comments&quot; column which contains the sentence &quot;employee will begin in&quot; + the date they will join.&lt;/p&gt;

&lt;p&gt;I tried starting off small by setting a fixed date to make the query work, but the @date variable is not returning 7/4/2014 after the sentence.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
DECLARE @date datetime
SET @date=&#39;7/4/2014&#39;
DECLARE @sql varchar (1000)
SELECT @sql =&#39;ALTER TABLE #employ ADD Comments varchar (200) DEFAULT &#39;&#39;employee will begin in&#39; + &#39;@date&#39;&#39;&#39;
EXEC (@sql)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once I get past this step, I can try working to figure out how to assign different date values for each employee ID.&lt;/p&gt;

&lt;p&gt;Thank you very much, any tips would be greatly appreciated.&lt;/p&gt;

        </summary>
    </entry>
    <entry>
        <id>http://stackoverflow.com/q/24592890</id>
        <re:rank scheme="http://stackoverflow.com">0</re:rank>
        <title type="text">Show banner based on cookie only once per browser session using asp.net</title>
            <category scheme="http://stackoverflow.com/tags" term="c#" />
            <category scheme="http://stackoverflow.com/tags" term="asp.net" />
            <category scheme="http://stackoverflow.com/tags" term="webforms" />
        <author>
            <name>KnowledgeSeeker</name>
            <uri>http://stackoverflow.com/users/1122748</uri>
        </author>
        <link rel="alternate" href="http://stackoverflow.com/questions/24592890/show-banner-based-on-cookie-only-once-per-browser-session-using-asp-net" />
        <published>2014-07-06T05:08:00Z</published>
        <updated>2014-07-06T05:29:58Z</updated>
        <summary type="html">
            

            &lt;p&gt;I want to show a banner only once per browser session.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; &amp;lt;asp:Panel ID=&quot;Panel1&quot; runat=&quot;server&quot;&amp;gt;



( run in 1.543 second using v1.01-cache-2.11-cpan-d8267643d1d )