File: services.py

package info (click to toggle)
python-bumps 0.7.11-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,264 kB
  • sloc: python: 22,226; ansic: 4,973; cpp: 4,849; xml: 493; makefile: 163; perl: 108; sh: 101
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