/usr/lib/python3/dist-packages/gearman/libgearman.py is in python3-gearman.libgearman 0.13.2-3build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.11
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (3,0,0):
new_instancemethod = lambda func, inst, cls: _libgearman.SWIG_PyInstanceMethod_New(func)
else:
from new import instancemethod as new_instancemethod
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_libgearman', [dirname(__file__)])
except ImportError:
import _libgearman
return _libgearman
if fp is not None:
try:
_mod = imp.load_module('_libgearman', fp, pathname, description)
finally:
fp.close()
return _mod
_libgearman = swig_import_helper()
del swig_import_helper
else:
import _libgearman
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "thisown"): return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError(name)
def _swig_repr(self):
try: strthis = "proxy of " + self.this.__repr__()
except: strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if (name == "thisown"): return self.this.own(value)
if hasattr(self,name) or (name == "this"):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
GEARMAN_VERBOSE_NEVER = _libgearman.GEARMAN_VERBOSE_NEVER
GEARMAN_VERBOSE_FATAL = _libgearman.GEARMAN_VERBOSE_FATAL
GEARMAN_VERBOSE_ERROR = _libgearman.GEARMAN_VERBOSE_ERROR
GEARMAN_VERBOSE_INFO = _libgearman.GEARMAN_VERBOSE_INFO
GEARMAN_VERBOSE_DEBUG = _libgearman.GEARMAN_VERBOSE_DEBUG
GEARMAN_VERBOSE_CRAZY = _libgearman.GEARMAN_VERBOSE_CRAZY
GEARMAN_VERBOSE_MAX = _libgearman.GEARMAN_VERBOSE_MAX
GEARMAN_NON_BLOCKING = _libgearman.GEARMAN_NON_BLOCKING
GEARMAN_DONT_TRACK_PACKETS = _libgearman.GEARMAN_DONT_TRACK_PACKETS
GEARMAN_MAX = _libgearman.GEARMAN_MAX
GEARMAN_CON_READY = _libgearman.GEARMAN_CON_READY
GEARMAN_CON_PACKET_IN_USE = _libgearman.GEARMAN_CON_PACKET_IN_USE
GEARMAN_CON_EXTERNAL_FD = _libgearman.GEARMAN_CON_EXTERNAL_FD
GEARMAN_CON_IGNORE_LOST_CONNECTION = _libgearman.GEARMAN_CON_IGNORE_LOST_CONNECTION
GEARMAN_CON_CLOSE_AFTER_FLUSH = _libgearman.GEARMAN_CON_CLOSE_AFTER_FLUSH
GEARMAN_CON_MAX = _libgearman.GEARMAN_CON_MAX
GEARMAN_CLIENT_ALLOCATED = _libgearman.GEARMAN_CLIENT_ALLOCATED
GEARMAN_CLIENT_NON_BLOCKING = _libgearman.GEARMAN_CLIENT_NON_BLOCKING
GEARMAN_CLIENT_TASK_IN_USE = _libgearman.GEARMAN_CLIENT_TASK_IN_USE
GEARMAN_CLIENT_UNBUFFERED_RESULT = _libgearman.GEARMAN_CLIENT_UNBUFFERED_RESULT
GEARMAN_CLIENT_NO_NEW = _libgearman.GEARMAN_CLIENT_NO_NEW
GEARMAN_CLIENT_FREE_TASKS = _libgearman.GEARMAN_CLIENT_FREE_TASKS
GEARMAN_CLIENT_GENERATE_UNIQUE = _libgearman.GEARMAN_CLIENT_GENERATE_UNIQUE
GEARMAN_CLIENT_MAX = _libgearman.GEARMAN_CLIENT_MAX
GEARMAN_WORKER_ALLOCATED = _libgearman.GEARMAN_WORKER_ALLOCATED
GEARMAN_WORKER_NON_BLOCKING = _libgearman.GEARMAN_WORKER_NON_BLOCKING
GEARMAN_WORKER_PACKET_INIT = _libgearman.GEARMAN_WORKER_PACKET_INIT
GEARMAN_WORKER_GRAB_JOB_IN_USE = _libgearman.GEARMAN_WORKER_GRAB_JOB_IN_USE
GEARMAN_WORKER_PRE_SLEEP_IN_USE = _libgearman.GEARMAN_WORKER_PRE_SLEEP_IN_USE
GEARMAN_WORKER_WORK_JOB_IN_USE = _libgearman.GEARMAN_WORKER_WORK_JOB_IN_USE
GEARMAN_WORKER_CHANGE = _libgearman.GEARMAN_WORKER_CHANGE
GEARMAN_WORKER_GRAB_UNIQ = _libgearman.GEARMAN_WORKER_GRAB_UNIQ
GEARMAN_WORKER_TIMEOUT_RETURN = _libgearman.GEARMAN_WORKER_TIMEOUT_RETURN
GEARMAN_WORKER_GRAB_ALL = _libgearman.GEARMAN_WORKER_GRAB_ALL
GEARMAN_WORKER_MAX = _libgearman.GEARMAN_WORKER_MAX
class Client(object):
"""Proxy of C gearman_client_st struct"""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
def copy(self) -> "Client *" :
"""copy(Client self) -> Client *"""
return _libgearman.Client_copy(self)
def error(self) -> "char const *" :
"""error(Client self) -> char const *"""
return _libgearman.Client_error(self)
def errno(self) -> "int" :
"""errno(Client self) -> int"""
return _libgearman.Client_errno(self)
def options(self) -> "gearman_client_options_t" :
"""options(Client self) -> gearman_client_options_t"""
return _libgearman.Client_options(self)
def set_options(self, *args) -> "void" :
"""set_options(Client self, gearman_client_options_t options)"""
return _libgearman.Client_set_options(self, *args)
def add_options(self, *args) -> "void" :
"""add_options(Client self, gearman_client_options_t options)"""
return _libgearman.Client_add_options(self, *args)
def remove_options(self, *args) -> "void" :
"""remove_options(Client self, gearman_client_options_t options)"""
return _libgearman.Client_remove_options(self, *args)
def add_server(self, *args) -> "gearman_return_t" :
"""
add_server(Client self, char const * host, in_port_t port) -> gearman_return_t
add_server(Client self, char const * host) -> gearman_return_t
add_server(Client self) -> gearman_return_t
"""
return _libgearman.Client_add_server(self, *args)
def add_servers(self, *args) -> "gearman_return_t" :
"""add_servers(Client self, char const * servers) -> gearman_return_t"""
return _libgearman.Client_add_servers(self, *args)
def remove_servers(self) -> "void" :
"""remove_servers(Client self)"""
return _libgearman.Client_remove_servers(self)
def do(self, *args) -> "gearman_return_t" :
"""do(Client self, char const * function_name, void const * workload, char const * unique=None) -> gearman_return_t"""
return _libgearman.Client_do(self, *args)
def do_high(self, *args) -> "gearman_return_t" :
"""do_high(Client self, char const * function_name, void const * workload, char const * unique=None) -> gearman_return_t"""
return _libgearman.Client_do_high(self, *args)
def do_low(self, *args) -> "gearman_return_t" :
"""do_low(Client self, char const * function_name, void const * workload, char const * unique=None) -> gearman_return_t"""
return _libgearman.Client_do_low(self, *args)
def do_job_handle(self) -> "char const *" :
"""do_job_handle(Client self) -> char const *"""
return _libgearman.Client_do_job_handle(self)
def do_status(self, *args) -> "void" :
"""do_status(Client self, uint32_t * numerator, uint32_t * denominator)"""
return _libgearman.Client_do_status(self, *args)
def do_background(self, *args) -> "gearman_return_t" :
"""do_background(Client self, char const * function_name, void const * workload, char const * unique=None) -> gearman_return_t"""
return _libgearman.Client_do_background(self, *args)
def do_high_background(self, *args) -> "gearman_return_t" :
"""do_high_background(Client self, char const * function_name, void const * workload, char const * unique=None) -> gearman_return_t"""
return _libgearman.Client_do_high_background(self, *args)
def do_low_background(self, *args) -> "gearman_return_t" :
"""do_low_background(Client self, char const * function_name, void const * workload, char const * unique=None) -> gearman_return_t"""
return _libgearman.Client_do_low_background(self, *args)
def job_status(self, *args) -> "gearman_return_t" :
"""job_status(Client self, char const * job_handle) -> gearman_return_t"""
return _libgearman.Client_job_status(self, *args)
Client.copy = new_instancemethod(_libgearman.Client_copy,None,Client)
Client.error = new_instancemethod(_libgearman.Client_error,None,Client)
Client.errno = new_instancemethod(_libgearman.Client_errno,None,Client)
Client.options = new_instancemethod(_libgearman.Client_options,None,Client)
Client.set_options = new_instancemethod(_libgearman.Client_set_options,None,Client)
Client.add_options = new_instancemethod(_libgearman.Client_add_options,None,Client)
Client.remove_options = new_instancemethod(_libgearman.Client_remove_options,None,Client)
Client.add_server = new_instancemethod(_libgearman.Client_add_server,None,Client)
Client.add_servers = new_instancemethod(_libgearman.Client_add_servers,None,Client)
Client.remove_servers = new_instancemethod(_libgearman.Client_remove_servers,None,Client)
Client.do = new_instancemethod(_libgearman.Client_do,None,Client)
Client.do_high = new_instancemethod(_libgearman.Client_do_high,None,Client)
Client.do_low = new_instancemethod(_libgearman.Client_do_low,None,Client)
Client.do_job_handle = new_instancemethod(_libgearman.Client_do_job_handle,None,Client)
Client.do_status = new_instancemethod(_libgearman.Client_do_status,None,Client)
Client.do_background = new_instancemethod(_libgearman.Client_do_background,None,Client)
Client.do_high_background = new_instancemethod(_libgearman.Client_do_high_background,None,Client)
Client.do_low_background = new_instancemethod(_libgearman.Client_do_low_background,None,Client)
Client.job_status = new_instancemethod(_libgearman.Client_job_status,None,Client)
Client_swigregister = _libgearman.Client_swigregister
Client_swigregister(Client)
class Worker(object):
"""Proxy of C gearman_worker_st struct"""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
def copy(self) -> "Worker *" :
"""copy(Worker self) -> Worker *"""
return _libgearman.Worker_copy(self)
def error(self) -> "char const *" :
"""error(Worker self) -> char const *"""
return _libgearman.Worker_error(self)
def errno(self) -> "int" :
"""errno(Worker self) -> int"""
return _libgearman.Worker_errno(self)
def options(self) -> "gearman_worker_options_t" :
"""options(Worker self) -> gearman_worker_options_t"""
return _libgearman.Worker_options(self)
def set_options(self, *args) -> "void" :
"""set_options(Worker self, gearman_worker_options_t options)"""
return _libgearman.Worker_set_options(self, *args)
def add_options(self, *args) -> "void" :
"""add_options(Worker self, gearman_worker_options_t options)"""
return _libgearman.Worker_add_options(self, *args)
def remove_options(self, *args) -> "void" :
"""remove_options(Worker self, gearman_worker_options_t options)"""
return _libgearman.Worker_remove_options(self, *args)
def timeout(self) -> "int" :
"""timeout(Worker self) -> int"""
return _libgearman.Worker_timeout(self)
def set_timeout(self, *args) -> "void" :
"""set_timeout(Worker self, int timeout)"""
return _libgearman.Worker_set_timeout(self, *args)
def add_server(self, *args) -> "gearman_return_t" :
"""
add_server(Worker self, char const * host, in_port_t port) -> gearman_return_t
add_server(Worker self, char const * host) -> gearman_return_t
add_server(Worker self) -> gearman_return_t
"""
return _libgearman.Worker_add_server(self, *args)
def add_servers(self, *args) -> "gearman_return_t" :
"""add_servers(Worker self, char const * servers) -> gearman_return_t"""
return _libgearman.Worker_add_servers(self, *args)
def register_function(self, *args) -> "gearman_return_t" :
"""register_function(Worker self, char const * function_name, uint32_t timeout=0) -> gearman_return_t"""
return _libgearman.Worker_register_function(self, *args)
def unregister_function(self, *args) -> "gearman_return_t" :
"""unregister_function(Worker self, char const * function_name) -> gearman_return_t"""
return _libgearman.Worker_unregister_function(self, *args)
def unregister_all(self) -> "gearman_return_t" :
"""unregister_all(Worker self) -> gearman_return_t"""
return _libgearman.Worker_unregister_all(self)
def grabJob(self) -> "Job *" :
"""grabJob(Worker self) -> Job *"""
return _libgearman.Worker_grabJob(self)
def add_function(self, *args) -> "gearman_return_t" :
"""add_function(Worker self, char const * function_name, gearman_callback * worker_fn, uint32_t timeout=0) -> gearman_return_t"""
return _libgearman.Worker_add_function(self, *args)
def work(self) -> "gearman_return_t" :
"""work(Worker self) -> gearman_return_t"""
return _libgearman.Worker_work(self)
def echo(self, *args) -> "gearman_return_t" :
"""echo(Worker self, void const * workload) -> gearman_return_t"""
return _libgearman.Worker_echo(self, *args)
Worker.copy = new_instancemethod(_libgearman.Worker_copy,None,Worker)
Worker.error = new_instancemethod(_libgearman.Worker_error,None,Worker)
Worker.errno = new_instancemethod(_libgearman.Worker_errno,None,Worker)
Worker.options = new_instancemethod(_libgearman.Worker_options,None,Worker)
Worker.set_options = new_instancemethod(_libgearman.Worker_set_options,None,Worker)
Worker.add_options = new_instancemethod(_libgearman.Worker_add_options,None,Worker)
Worker.remove_options = new_instancemethod(_libgearman.Worker_remove_options,None,Worker)
Worker.timeout = new_instancemethod(_libgearman.Worker_timeout,None,Worker)
Worker.set_timeout = new_instancemethod(_libgearman.Worker_set_timeout,None,Worker)
Worker.add_server = new_instancemethod(_libgearman.Worker_add_server,None,Worker)
Worker.add_servers = new_instancemethod(_libgearman.Worker_add_servers,None,Worker)
Worker.register_function = new_instancemethod(_libgearman.Worker_register_function,None,Worker)
Worker.unregister_function = new_instancemethod(_libgearman.Worker_unregister_function,None,Worker)
Worker.unregister_all = new_instancemethod(_libgearman.Worker_unregister_all,None,Worker)
Worker.grabJob = new_instancemethod(_libgearman.Worker_grabJob,None,Worker)
Worker.add_function = new_instancemethod(_libgearman.Worker_add_function,None,Worker)
Worker.work = new_instancemethod(_libgearman.Worker_work,None,Worker)
Worker.echo = new_instancemethod(_libgearman.Worker_echo,None,Worker)
Worker_swigregister = _libgearman.Worker_swigregister
Worker_swigregister(Worker)
class Job(object):
"""Proxy of C gearman_job_st struct"""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def send_status(self, *args) -> "gearman_return_t" :
"""send_status(Job self, uint32_t numerator, uint32_t denominator) -> gearman_return_t"""
return _libgearman.Job_send_status(self, *args)
def send_fail(self) -> "gearman_return_t" :
"""send_fail(Job self) -> gearman_return_t"""
return _libgearman.Job_send_fail(self)
def job_handle(self) -> "char *" :
"""job_handle(Job self) -> char *"""
return _libgearman.Job_job_handle(self)
def function_name(self) -> "char *" :
"""function_name(Job self) -> char *"""
return _libgearman.Job_function_name(self)
def unique(self) -> "char const *" :
"""unique(Job self) -> char const *"""
return _libgearman.Job_unique(self)
def get_workload(self) -> "gearman_workload" :
"""get_workload(Job self) -> gearman_workload"""
return _libgearman.Job_get_workload(self)
def __init__(self):
"""__init__(gearman_job_st self) -> Job"""
_libgearman.Job_swiginit(self,_libgearman.new_Job())
__swig_destroy__ = _libgearman.delete_Job
Job.send_status = new_instancemethod(_libgearman.Job_send_status,None,Job)
Job.send_fail = new_instancemethod(_libgearman.Job_send_fail,None,Job)
Job.job_handle = new_instancemethod(_libgearman.Job_job_handle,None,Job)
Job.function_name = new_instancemethod(_libgearman.Job_function_name,None,Job)
Job.unique = new_instancemethod(_libgearman.Job_unique,None,Job)
Job.get_workload = new_instancemethod(_libgearman.Job_get_workload,None,Job)
Job_swigregister = _libgearman.Job_swigregister
Job_swigregister(Job)
Worker.register = new_instancemethod(_libgearman.Worker_register_function,None,Worker)
|