-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathbase.cfg
191 lines (171 loc) · 6.57 KB
/
base.cfg
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
[buildout]
extensions = mr.developer
package-name =
openprocurement.api
openprocurement.concord
openprocurement.planning.api
openprocurement.tender.limited
openprocurement.tender.openua
openprocurement.tender.openeu
openprocurement.contracting.api
openprocurement.tender.openuadefense
openprocurement.tender.competitivedialogue
openprocurement.circus.plugins
openprocurement.subscribers.serverid
openprocurement.archivarius.core
openprocurement.archivarius.contracts
openprocurement.archivarius.plans
openprocurement.archivarius.tenders
auto-checkout = ${:package-name}
parts =
scripts
couchpy
circus
circusd
circusctl
circus.ini
couchdb.ini
openprocurement.api.ini
openprocurement.concord
shredder
eggs =
chaussette
request_id_middleware
server_cookie_middleware
${:package-name}
find-links =
http://op:x9W3jZ@dist.quintagroup.com/op/
[remotes]
gh = https://github.com/
gh_push = git@github.com:
opgh = ${remotes:gh}openprocurement/openprocurement
opgh_push = ${remotes:gh_push}openprocurement/openprocurement
[sources]
openprocurement.api = git ${remotes:opgh}.api.git pushurl=${remotes:opgh_push}.api.git branch=scale_2_0
openprocurement.concord = git ${remotes:opgh}.concord.git pushurl=${remotes:opgh_push}.concord.git
openprocurement.planning.api = git ${remotes:opgh}.planning.api.git pushurl=${remotes:opgh_push}.planning.api.git
openprocurement.tender.limited = git ${remotes:opgh}.tender.limited.git pushurl=${remotes:opgh_push}.tender.limited.git
openprocurement.tender.openua = git ${remotes:opgh}.tender.openua.git pushurl=${remotes:opgh_push}.tender.openua.git
openprocurement.tender.openeu = git ${remotes:opgh}.tender.openeu.git pushurl=${remotes:opgh_push}.tender.openeu.git
openprocurement.contracting.api = git ${remotes:opgh}.contracting.api.git pushurl=${remotes:opgh_push}.contracting.api.git
openprocurement.tender.openuadefense = git ${remotes:opgh}.tender.openuadefense.git pushurl=${remotes:opgh_push}.tender.openuadefense.git
openprocurement.tender.competitivedialogue = git ${remotes:opgh}.tender.competitivedialogue.git pushurl=${remotes:opgh_push}.tender.competitivedialogue.git
openprocurement.circus.plugins = git ${remotes:opgh}.circus.plugins.git pushurl=${remotes:opgh_push}.circus.plugins.git
openprocurement.subscribers.serverid = git ${remotes:opgh}.subscribers.serverid.git pushurl=${remotes:opgh_push}.subscribers.serverid.git
openprocurement.archivarius.contracts = git ${remotes:opgh}.archivarius.contracts.git pushurl=${remotes:opgh_push}.archivarius.contracts.git
openprocurement.archivarius.plans = git ${remotes:opgh}.archivarius.plans.git pushurl=${remotes:opgh_push}.archivarius.plans.git
openprocurement.archivarius.tenders = git ${remotes:opgh}.archivarius.tenders.git pushurl=${remotes:opgh_push}.archivarius.tenders.git
openprocurement.archivarius.core = git ${remotes:opgh}.archivarius.core.git pushurl=${remotes:opgh_push}.archivarius.core.git
[config-from-template]
recipe = collective.recipe.template[genshi]:genshi
input = ${buildout:directory}/templates/${:_buildout_section_name_}
output = ${buildout:directory}/etc/${:_buildout_section_name_}
[scripts]
recipe = zc.recipe.egg
eggs = ${buildout:eggs}
interpreter = python
scripts = chaussette
[contracting_data_bridge]
recipe = zc.recipe.egg
eggs =
openprocurement.contracting.api [databridge]
scripts = contracting_data_bridge
[competitive_dialogue_data_bridge]
recipe = zc.recipe.egg
eggs =
openprocurement.tender.competitivedialogue [databridge]
scripts = competitive_dialogue_data_bridge
[circus]
recipe = zc.recipe.egg
eggs =
circus
circus-web
openprocurement.circus.plugins
interpreter =
scripts =
circusd-stats
circus-top
circus-plugin
circushttpd
[couchpy]
<=circus
eggs = CouchDB
scripts =
couchpy
couchdb-replicate
[circusd]
<=circus
initialization =
sys.argv[1:1] = ('${buildout:directory}/etc/circus.ini').split()
scripts = circusd
[circusctl]
<=circus
initialization =
sys.argv[1:1] = ('--endpoint ${circus.ini:endpoint}').split()
scripts = circusctl
[circus.ini]
<= config-from-template
couchdb = True
concord = True
penstock =
vaurien =
statsd = True
webapp = True
web_port = 6543
web_host = 0.0.0.0
endpoint = ipc://${buildout:directory}/var/circus_endpoint
pubsub_endpoint = ipc://${buildout:directory}/var/circus_pubsub
timezone = Europe/Kiev
[couchdb.ini]
<= config-from-template
port = 5984
host = 127.0.0.1
[openprocurement.api.ini]
<= config-from-template
couchdb_url = http://${couchdb.ini:host}:${couchdb.ini:port}/
couchdb_db = openprocurement
debug = false
auth_file = ${buildout:directory}/auth.ini
exc_logger = 1
[logrotate.conf]
<= config-from-template
logs_bucket =
logs_dir =
aws_access_key = ${openprocurement.api.ini:aws_access_key}
aws_secret_key = ${openprocurement.api.ini:aws_secret_key}
[logrotate-hourly]
recipe = z3c.recipe.usercrontab
times = @hourly
command = /usr/sbin/logrotate --state ${buildout:directory}/var/logrotate.status ${logrotate.conf:output} >>${buildout:directory}/var/log/logrotate.log 2>&1
[awscli]
recipe = zc.recipe.egg
scripts = aws
[openprocurement.concord]
recipe = zc.recipe.egg
entry-points = concord=openprocurement.concord.daemon:main
arguments = '${openprocurement.api.ini:couchdb_url}', '${openprocurement.api.ini:couchdb_db}', '${buildout:directory}/var/${:_buildout_section_name_}.status', '${buildout:directory}/var/${:_buildout_section_name_}'
[autostart]
recipe = z3c.recipe.usercrontab
times = @reboot
command = ${buildout:directory}/bin/circusd --daemon --pidfile ${buildout:directory}/circus.pid
[shredder]
recipe = collective.recipe.template
inline =
#!${buildout:bin-directory}/python
from couchdb import Server
from couchdb.design import ViewDefinition
from openprocurement.api.models import get_now
from datetime import timedelta
aserver = Server('http://${couchdb.ini:username}:${couchdb.ini:password}@${couchdb.ini:host}:${couchdb.ini:port}/')
adb = aserver['${openprocurement.api.ini:couchdb_db}']
server = Server('${openprocurement.api.ini:couchdb_url}')
db = server['${openprocurement.api.ini:couchdb_db}']
shredder_view = ViewDefinition('shredder', 'tenders', "function(doc){if(doc.doc_type=='Tender' && doc.status=='draft'){emit(doc.dateModified, doc._rev)}}")
ViewDefinition.sync_many(adb, [shredder_view])
date = (get_now() - timedelta(7)).isoformat()
tenders = []
for i in shredder_view(db, endkey=date):
tenders.append({'_id': i.id, '_rev': i.value, '_deleted': True})
print db.update(tenders)
output = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 755