<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 04/19/2015 09:11 AM, Todd Morgan
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADfCXiuukoUxFBJ+ocXXBqGVCjMwsz6DcfiSFKP1C6kaQGaJaw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>Hi,<br>
                    </div>
                     I'm trying to set up a new Kallithea 0.2.1
                    installation upon a Win2k12 box (clean - nothing
                    else installed).<br>
                    <br>
                  </div>
                  I am able to get Kallithea working AOK without Celery
                  and RabbitMQ - but I have a large number of repos
                  (100+) to support so I need the scaling Celery
                  provides.<br>
                  <br>
                </div>
                When I enable celery I get a message in the celeryD log
                indicating that "<b>Task of kind
                  'kallithea.lib.celerylib.tasks.create_repo' is not
                  registered, please make sure it's imported."</b><br>
                <br>
                [2015-04-19 22:13:48,183: DEBUG/MainProcess] Consumer:
                Ready to accept tasks!<br>
                [2015-04-19 22:20:14,302: INFO/MainProcess] Got task
                from broker:
kallithea.lib.celerylib.tasks.create_repo[65d4b6a4-8ef8-41d0-9f75-32479394e32e]<br>
                [2015-04-19 22:20:14,332: DEBUG/MainProcess] Mediator:
                Running callback for task:
kallithea.lib.celerylib.tasks.create_repo[65d4b6a4-8ef8-41d0-9f75-32479394e32e]<br>
                [2015-04-19 22:20:14,348: DEBUG/MainProcess] TaskPool:
                Apply <function execute_and_trace at
                0x00000000053A6E48>
                (args:('kallithea.lib.celerylib.tasks.create_repo',
                '65d4b6a4-8ef8-41d0-9f75-32479394e32e', ({'repo_type':
                u'git', 'repo_name': u'automation',
                'repo_enable_downloads': False, '_authentication_token':
                u'85022200563145360862159926964161116912',
                'repo_copy_permissions': False, 'repo_enable_locking':
                False, 'repo_landing_rev': u'rev:tip', 'group_name': '',
                'clone_uri': u'', 'add': u'Add', 'repo_name_full':
                u'automation', 'repo_group': None, 'group_path': '',
                'repo_private': False, 'repo_enable_statistics': False,
                'repo_description': u'<a moz-do-not-send="true"
                  href="http://littleone:8088/scm/git/automation.git%27">http://littleone:8088/scm/git/automation.git'</a>},
                2), {}) kwargs:{'hostname': 'WIN-PF6LKO8R2ST',
                'request': {'retries': 0, 'loglevel': 10,
                'delivery_info': {'consumer_tag': u'2', 'routing_key':
                u'celery', 'exchange': u'celery'}, 'is_eager': False,
                'taskset': None, 'logfile': 'celeryd.log', 'id':
                '65d4b6a4-8ef8-41d0-9f75-32479394e32e'}})<br>
                [2015-04-19 22:20:14,380: DEBUG/MainProcess] Task
                accepted:
                kallithea.lib.celerylib.tasks.create_repo[65d4b6a4-8ef8-41d0-9f75-32479394e32e]
                pid:2884<br>
                [2015-04-19 22:20:14,473: ERROR/MainProcess] Task
                kallithea.lib.celerylib.tasks.create_repo[65d4b6a4-8ef8-41d0-9f75-32479394e32e]
                raised exception: <b>Task of kind
                  'kallithea.lib.celerylib.tasks.create_repo' is not
                  registered, please make sure it's imported.</b><br>
                NotRegistered:
                'kallithea.lib.celerylib.tasks.create_repo'<br>
                None<br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    As you suggest, this seems to mean that celeryd runs in a way where
    it doesn't see your Kallithea instance and it can thus not launch
    the create_repo task.<br>
    <br>
    <blockquote
cite="mid:CADfCXiuukoUxFBJ+ocXXBqGVCjMwsz6DcfiSFKP1C6kaQGaJaw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div><br>
              </div>
              <div>I have followed the instructions here <a
                  moz-do-not-send="true"
                  href="http://kallithea.readthedocs.org/en/latest/installation_win.html">http://kallithea.readthedocs.org/en/latest/installation_win.html</a><br>
              </div>
              <div><br>
              </div>
              <div>My installation includes:<br>
              </div>
              <ul>
                <li>The win2k12 box is clean (VM) setup for testing this
                  - all patches - UAC disabled<br>
                </li>
                <li>Python 2.7.9 (python-2.7.9.amd64.msi) +
                  pywin32-219.win-amd64-py2.7.exe<br>
                </li>
                <li>Postgres support ( I had to add this pip install
                  psycopg2 to get the postgres support)</li>
                <li>I installed the latest version of Erlang
                  otp_win64_17.5.exe</li>
                <li>Latest version of Postgres
                  (postgresql-9.4.1-3-windows-x64.exe)</li>
                <li>Latest version of Rabbit rabbitmq-server-3.5.1.exe</li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    I wasn't aware that celery was an option on windows ... but it
    totally makes sense it is. It seems like you have gotten further
    than the documentation covers - it would be great if you can help
    extend the documentation ... especially when you get it working in
    the end ;-)<br>
    <br>
    <blockquote
cite="mid:CADfCXiuukoUxFBJ+ocXXBqGVCjMwsz6DcfiSFKP1C6kaQGaJaw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>The post suggests it's not including the relevant "virtual
          environment" in the path (I'm a java dev by profession rather
          than a Python dev) so I'm not sure if that's right ...<br>
          <br>
        </div>
        <div>I did try using a fully qualified path for the Paster.exe<br>
          <br>
          (Env) C:\Kallithea\Bin>C:\Kallithea\Env\Scripts\paster.exe
          celeryd production.ini &<br>
          (Env) C:\Kallithea\Bin>C:\Kallithea\Env\Scripts\paster.exe
          serve production.ini<br>
        </div>
      </div>
    </blockquote>
    <br>
    Is the & a typo? It is sh notation for running a process in the
    background, but AFAIK it means "command sequence" on windows? Are
    you sure you actually are launching celeryd here?<br>
    <br>
    It also seems wrong to use a paster.exe directly this way. On unix
    the virtualenv has a bin/paster which launches a
    pkg_resources.load_entry_point - it seems magic if this paster.exe
    does the same ... but perhaps it does.<br>
    <br>
    <blockquote
cite="mid:CADfCXiuukoUxFBJ+ocXXBqGVCjMwsz6DcfiSFKP1C6kaQGaJaw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Given that the machine is solely dedicated to this purpose
          I also tried NOT using virtualenv - that way it would be
          impossible??? to get an incorrect context for Celeryd (as
          there would only be 1 python) and the result was the same -
          celery task not registered<br>
        </div>
      </div>
    </blockquote>
    <br>
    Yes, that might be simpler in this case. Windows has a stronger
    tradition for installing Python whereever you want, while Unix
    systems are more like only having one global installation in a fixed
    location.<br>
    <br>
    In that case I suggest verifying that you really don't use
    virtualenv and that Kallithea is installed globally ... and perhaps
    restart the machine to make sure everything is running in the right
    environment.<br>
    <br>
    <br>
    Also, you might consider starting out without celeryd. That might be
    ok for your actual work load - mainly depending on how often you
    make big clones or have a slow mail server.<br>
    <br>
    <br>
    /Mads<br>
  </body>
</html>