Permalink
Commits on Aug 11, 2014
  1. Merge pull request #62 from dakaufma/master

    yyejun committed Aug 11, 2014
    Added documentation for types of gearman jobs
Commits on Aug 6, 2014
  1. Added documentation for types of gearman jobs

    David Kaufman committed Aug 6, 2014
Commits on Jan 9, 2014
  1. remove more tests due to pull #55

    yyejun committed Jan 9, 2014
  2. Merge pull request #34 from zaro0508/update-admin-client

    yyejun committed Jan 9, 2014
    Add additional commands to the admin client.
  3. Merge pull request #54 from Shrews/ssl_exc_fix

    yyejun committed Jan 9, 2014
    Catch WANT_READ and WANT_WRITE SSL exceptions
  4. Merge pull request #55 from noamraph/master

    yyejun committed Jan 9, 2014
    Don't remove entries from handle_to_request_map.
Commits on Oct 29, 2013
  1. Don't remove entries from handle_to_request_map.

    noamraph committed Oct 29, 2013
    Since it's a WeakValueDict, no memory leak will be caused by not
    removing entries, and in some cases entries are used even after
    COMPLETE messages.
    
    Fixes #13
Commits on Oct 16, 2013
  1. Catch WANT_READ and WANT_WRITE SSL exceptions

    Shrews committed Oct 16, 2013
    SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE could possibly be
    thrown from either recv() or send(), so we need to make sure both
    are handled.
Commits on Aug 7, 2013
  1. Merge pull request #46 from Shrews/fix_ssl_recv

    klange committed Aug 7, 2013
    Address some SSL handling issues.
  2. Do not attempt to register connections not yet established

    Shrews committed Aug 7, 2013
    When using multiple job servers, some connections may not yet be
    established (not been chosen yet), so their socket is still invalid.
    This would cause poller.register() to throw an exception.
  3. Handle SSL WANT_READ/WANT_WRITE exceptions and drain SSL buffer.

    Shrews committed Aug 7, 2013
    SSL has in internal read buffer that needs to be drained. Since
    we, by default, read in 4K chunks, anything larger would have left
    data to be read that may not have been processed properly.
    
    Also, we need to handle SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE
    exceptions around the recv() and send() calls, otherwise we would
    think we are disconnected and cause all sorts of problems.
Commits on Jul 9, 2013
  1. Merge pull request #45 from Shrews/ssl_fix

    klange committed Jul 9, 2013
    Require cert validation of server.
Commits on Jun 28, 2013
  1. Merge pull request #43 from Shrews/ssl_support

    klange committed Jun 28, 2013
    Add SSL support.
  2. Merge pull request #41 from Shrews/master

    klange committed Jun 28, 2013
    Import JOB_UNKNOWN constant.
Commits on Jun 18, 2013
  1. Add SSL support.

    David Shrewsbury committed Jun 17, 2013
    This adds support for SSL connections to an SSL enabled job server.
    To use SSL, three SSL-related files must be given when defining a
    job server connection:
    
      keyfile - File with the private key
      certfile - File with the public key
      ca_certs - File with the CA public cert(s)
    
    GearmanConnectionManager has been modified to simultaneously
    support non-SSL and SSL connections alike. Nothing changes for
    non-SSL connections:
    
      GearmanClient(['localhost:4730'])
    
    SSL connections require that the host list use a dictionary to
    define the connection:
    
      s1 = { 'host': 'localhost',
             'port': 4730,
             'keyfile': '/path/to/keyfile',
             'certfile': '/path/to/certfile',
             'ca_certs': '/path/to/ca_certs' }
      GearmanClient([s1])
    
    Currently, all three SSL related files MUST be given and the port
    must be specified in the dictionary.
Commits on Jun 10, 2013
  1. Import JOB_UNKNOWN at top-level.

    Shrews committed Jun 10, 2013
Commits on Apr 1, 2013
  1. Add additional commands to the admin client.

    zaro0508 committed Apr 1, 2013
    Added the following methods to the GearmanAdminClient class
      1. get_jobs methods is equivalent to gearadmin's '--show-jobs'
      2. get_unique_jobs method is equivalent to gearadmin's '--show-unique-jobs'
      3. get_pid methos is equivalent to gearadmin's '--getpid'
      4. cancel_job method is equivalent to gearadmin's '--cancel-job'
    
    The get_jobs, get_unique_jobs and cancel_job protocols has not been
    released yet.  These protocols are in 1.2 branch commited in
    milestone: https://launchpad.net/gearmand/+milestone/1.1.6
Commits on Feb 15, 2013
  1. Merge pull request #33 from malor/master

    klange committed Feb 15, 2013
    Fix slow handling of connection incoming buffer
Commits on Feb 14, 2013
  1. Use array.array('c') as a type of incomming buffer

    malor committed Feb 14, 2013
    A connection incoming buffer is extended using += operator. This leads
    to unnecessary memory allocations and significant performance drops when
    transferring big amounts of data (i. e. a few megabytes). Using of the array('c')
    (an array of bytes) data type enables us to handle incoming data efficiently.
Commits on Feb 6, 2013
  1. Merge pull request #30 from kylemcc/epoll

    klange committed Feb 6, 2013
    update connection multiplexing code to use epoll when available, fall back to select when not available
  2. update connection multiplexing code to use epoll when available, fall…

    kylemcc committed Jan 29, 2013
    … back to select when not
Commits on Feb 5, 2013
  1. Merge pull request #32 from klange/master

    klange committed Feb 5, 2013
    Revert reconnect branch
  2. Revert the reconnect branch

    klange committed Feb 5, 2013
Commits on Oct 9, 2012
  1. Merge pull request #29 from klange/master

    eskil committed Oct 9, 2012
    Reconnect (if safe to do so) between calls to poll_connections_until_stopped
Commits on Oct 2, 2012
  1. Only reconnect if a given time has passed

    klange committed Oct 2, 2012
    This is a per-connection timeout, default is 60 seconds.
Commits on Sep 25, 2012
  1. Make the reconnect safe when we have data to send.

    klange committed Sep 25, 2012
    If the outgoing buffer isn't empty, we're still sending
    a command. We should wait to restart the connection until
    we've given the buffer a chance to empty and a response to come
    through from the daemon.
Commits on Sep 24, 2012
  1. Reset connections during poll_until timeout

    klange committed Sep 24, 2012
    This is a bit of a hack, but:
        When poll_connections_until_stopped's timer triggers and the loop
        ends, this will reconnect connected connections when
        establish_connection is called, rather than just continuing.
    
        This might break things, and that would be terrible; but if it
        doesn't, then life is good and this should fix the odd problem of
        having connections we can't seem to write to, leaving us with only
        one connection to the server that actually gets used.
Commits on Sep 6, 2012
  1. Update changes

    Eskil Olsen committed Sep 6, 2012
  2. Merge pull request #26 from eskilolsen/master

    eskil committed Sep 6, 2012
    Fixed handling of null chars in arguments. No 'ascii' checks.
Commits on Sep 5, 2012
  1. Add more checking for null and non-ascii chars.

    Eskil Olsen committed Sep 5, 2012
    The protocol says;
    "Arguments given in the data part are separated by a NULL byte, and
    the last argument is determined by the size of data after the last
    NULL byte separator. All job handle arguments must not be longer than
    64 bytes, including NULL terminator."
    
    This adds a check to ensure that all arguments, but the last, do
    not contain \0.
    
    I do not check the args pass encode('ascii'). It would make sense,
    since it's not known what will happen inside the bowels of gearmand.
    It uses memcmp for the most part, and we have to assume the
    queue storage can handle utf8, as long as it does not contain
    \0.
Commits on Sep 4, 2012
  1. Updated to reflect the reverts

    Eskil Olsen committed Sep 4, 2012