File: services.py

package info (click to toggle)
python-bumps 1.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,200 kB
  • sloc: python: 24,517; xml: 493; ansic: 373; makefile: 211; javascript: 99; sh: 94
file content (32 lines) | stat: -rw-r--r-- 639 bytes parent folder | download | duplicates (2)
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
"""
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
"""


# 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