File: services.py

package info (click to toggle)
python-bumps 0.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,688 kB
  • sloc: python: 24,446; ansic: 4,973; cpp: 4,849; javascript: 639; xml: 493; makefile: 147; perl: 108; sh: 94
file content (29 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (3)
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
"""
Available services.

During configuration of your worker you can add and remove services from
the system using, for example::

    from jobqueue import services

    del services.fitter

    import integration
    services.integrate = integration.service.service
"""
from __future__ import print_function

# TODO: modify runjob so that services can be downloaded
# TODO: support over the wire transport for privileged users

def fitter(request):
    from bumps.fitservice import fitservice
    return fitservice(request)

def count(request):
    print("counting")
    total = 0
    for _ in range(request['data']):
        total += 1
    print("done")
    return total