-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
61 lines (50 loc) · 1.39 KB
/
app.py
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
# -*- coding: utf-8 -*-
# TAD courtesy
# Samy Duc
# app main and config file
import web
import client
import job
import public
urls = (
'/', 'public.Stats',
'/index', 'index',
'/addclient', 'client.AddClient',
'/delclient', 'client.DelClient',
'/register', 'client.Register',
'/logout', 'client.LogOut',
'/showclient', 'client.ShowClient',
'/chclient', 'client.ChClient',
'/addjob', 'job.AddJob',
'/getjob', 'job.GetJob',
'/donejob', 'job.DoneJob',
'/pausejob', 'job.PauseJob',
'/unpausejob', 'job.UnpauseJob',
'/showjob', 'job.ShowJob',
)
# config
debug_string = "!"
salt_charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
cookie_name = "id"
cookie_age = 99999
score_down = 300000
# computation time in second for an average range
# number of computation choosen with this variable and cpu availability on host
average_range_time = 900
# mm:ss
range_timeout = '00:30:00'
# dict
charset = {'a' : 'abcdefghijklmnopqrstuvwxyz',\
'A' : 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',\
'0' : '0123456789',\
'*' : ' !#$%&()*+,-./:;<=>?@[\\]^_{|}~'}
db = web.database(dbn='postgres', user='', pw='', db='', host='')
render = web.template.render('templates/')
class index:
def GET(self):
return "Lazy-Hamilton"
if __name__ == "__main__":
web.config.debug = True
web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr)
app = web.application(urls, globals())
app.run()