##// END OF EJS Templates
chore(deps): bumped celery to 5.3.6 and kombu to latest version
super-admin -
r5297:d8a4789a default
parent child Browse files
Show More
@@ -1,295 +1,295 b''
1 # deps, generated via pipdeptree --exclude setuptools,wheel,pipdeptree,pip -f | tr '[:upper:]' '[:lower:]'
1 # deps, generated via pipdeptree --exclude setuptools,wheel,pipdeptree,pip -f | tr '[:upper:]' '[:lower:]'
2
2
3 alembic==1.12.1
3 alembic==1.12.1
4 mako==1.2.4
4 mako==1.2.4
5 markupsafe==2.1.2
5 markupsafe==2.1.2
6 sqlalchemy==1.4.51
6 sqlalchemy==1.4.51
7 greenlet==3.0.3
7 greenlet==3.0.3
8 typing_extensions==4.9.0
8 typing_extensions==4.9.0
9 async-timeout==4.0.3
9 async-timeout==4.0.3
10 babel==2.12.1
10 babel==2.12.1
11 beaker==1.12.1
11 beaker==1.12.1
12 celery==5.3.4
12 celery==5.3.6
13 billiard==4.1.0
13 billiard==4.2.0
14 click==8.1.3
14 click==8.1.3
15 click-didyoumean==0.3.0
15 click-didyoumean==0.3.0
16 click==8.1.3
16 click==8.1.3
17 click-plugins==1.1.1
17 click-plugins==1.1.1
18 click==8.1.3
18 click==8.1.3
19 click-repl==0.2.0
19 click-repl==0.2.0
20 click==8.1.3
20 click==8.1.3
21 prompt-toolkit==3.0.38
21 prompt-toolkit==3.0.38
22 wcwidth==0.2.6
22 wcwidth==0.2.6
23 six==1.16.0
23 six==1.16.0
24 kombu==5.3.2
24 kombu==5.3.5
25 amqp==5.1.1
25 amqp==5.2.0
26 vine==5.1.0
26 vine==5.1.0
27 vine==5.1.0
27 vine==5.1.0
28 python-dateutil==2.8.2
28 python-dateutil==2.8.2
29 six==1.16.0
29 six==1.16.0
30 tzdata==2023.4
30 tzdata==2023.4
31 vine==5.1.0
31 vine==5.1.0
32 channelstream==0.7.1
32 channelstream==0.7.1
33 gevent==23.9.1
33 gevent==23.9.1
34 greenlet==3.0.3
34 greenlet==3.0.3
35 zope.event==5.0.0
35 zope.event==5.0.0
36 zope.interface==6.1.0
36 zope.interface==6.1.0
37 itsdangerous==1.1.0
37 itsdangerous==1.1.0
38 marshmallow==2.18.0
38 marshmallow==2.18.0
39 pyramid==2.0.2
39 pyramid==2.0.2
40 hupper==1.12
40 hupper==1.12
41 plaster==1.1.2
41 plaster==1.1.2
42 plaster-pastedeploy==1.0.1
42 plaster-pastedeploy==1.0.1
43 pastedeploy==3.1.0
43 pastedeploy==3.1.0
44 plaster==1.1.2
44 plaster==1.1.2
45 translationstring==1.4
45 translationstring==1.4
46 venusian==3.0.0
46 venusian==3.0.0
47 webob==1.8.7
47 webob==1.8.7
48 zope.deprecation==5.0.0
48 zope.deprecation==5.0.0
49 zope.interface==6.1.0
49 zope.interface==6.1.0
50 pyramid-apispec==0.3.3
50 pyramid-apispec==0.3.3
51 apispec==1.3.3
51 apispec==1.3.3
52 pyramid-jinja2==2.10
52 pyramid-jinja2==2.10
53 jinja2==3.1.2
53 jinja2==3.1.2
54 markupsafe==2.1.2
54 markupsafe==2.1.2
55 markupsafe==2.1.2
55 markupsafe==2.1.2
56 pyramid==2.0.2
56 pyramid==2.0.2
57 hupper==1.12
57 hupper==1.12
58 plaster==1.1.2
58 plaster==1.1.2
59 plaster-pastedeploy==1.0.1
59 plaster-pastedeploy==1.0.1
60 pastedeploy==3.1.0
60 pastedeploy==3.1.0
61 plaster==1.1.2
61 plaster==1.1.2
62 translationstring==1.4
62 translationstring==1.4
63 venusian==3.0.0
63 venusian==3.0.0
64 webob==1.8.7
64 webob==1.8.7
65 zope.deprecation==5.0.0
65 zope.deprecation==5.0.0
66 zope.interface==6.1.0
66 zope.interface==6.1.0
67 zope.deprecation==5.0.0
67 zope.deprecation==5.0.0
68 python-dateutil==2.8.2
68 python-dateutil==2.8.2
69 six==1.16.0
69 six==1.16.0
70 requests==2.28.2
70 requests==2.28.2
71 certifi==2022.12.7
71 certifi==2022.12.7
72 charset-normalizer==3.1.0
72 charset-normalizer==3.1.0
73 idna==3.4
73 idna==3.4
74 urllib3==1.26.14
74 urllib3==1.26.14
75 ws4py==0.5.1
75 ws4py==0.5.1
76 deform==2.0.15
76 deform==2.0.15
77 chameleon==3.10.2
77 chameleon==3.10.2
78 colander==2.0
78 colander==2.0
79 iso8601==1.1.0
79 iso8601==1.1.0
80 translationstring==1.4
80 translationstring==1.4
81 iso8601==1.1.0
81 iso8601==1.1.0
82 peppercorn==0.6
82 peppercorn==0.6
83 translationstring==1.4
83 translationstring==1.4
84 zope.deprecation==5.0.0
84 zope.deprecation==5.0.0
85 diskcache==5.6.3
85 diskcache==5.6.3
86 docutils==0.19
86 docutils==0.19
87 dogpile.cache==1.3.0
87 dogpile.cache==1.3.0
88 decorator==5.1.1
88 decorator==5.1.1
89 stevedore==5.1.0
89 stevedore==5.1.0
90 pbr==5.11.1
90 pbr==5.11.1
91 formencode==2.1.0
91 formencode==2.1.0
92 six==1.16.0
92 six==1.16.0
93 gunicorn==21.2.0
93 gunicorn==21.2.0
94 packaging==23.1
94 packaging==23.1
95 gevent==23.9.1
95 gevent==23.9.1
96 greenlet==3.0.3
96 greenlet==3.0.3
97 zope.event==5.0.0
97 zope.event==5.0.0
98 zope.interface==6.1.0
98 zope.interface==6.1.0
99 ipython==8.14.0
99 ipython==8.14.0
100 backcall==0.2.0
100 backcall==0.2.0
101 decorator==5.1.1
101 decorator==5.1.1
102 jedi==0.19.0
102 jedi==0.19.0
103 parso==0.8.3
103 parso==0.8.3
104 matplotlib-inline==0.1.6
104 matplotlib-inline==0.1.6
105 traitlets==5.9.0
105 traitlets==5.9.0
106 pexpect==4.8.0
106 pexpect==4.8.0
107 ptyprocess==0.7.0
107 ptyprocess==0.7.0
108 pickleshare==0.7.5
108 pickleshare==0.7.5
109 prompt-toolkit==3.0.38
109 prompt-toolkit==3.0.38
110 wcwidth==0.2.6
110 wcwidth==0.2.6
111 pygments==2.15.1
111 pygments==2.15.1
112 stack-data==0.6.2
112 stack-data==0.6.2
113 asttokens==2.2.1
113 asttokens==2.2.1
114 six==1.16.0
114 six==1.16.0
115 executing==1.2.0
115 executing==1.2.0
116 pure-eval==0.2.2
116 pure-eval==0.2.2
117 traitlets==5.9.0
117 traitlets==5.9.0
118 markdown==3.4.3
118 markdown==3.4.3
119 msgpack==1.0.7
119 msgpack==1.0.7
120 mysqlclient==2.1.1
120 mysqlclient==2.1.1
121 nbconvert==7.7.3
121 nbconvert==7.7.3
122 beautifulsoup4==4.11.2
122 beautifulsoup4==4.11.2
123 soupsieve==2.4
123 soupsieve==2.4
124 bleach==6.1.0
124 bleach==6.1.0
125 six==1.16.0
125 six==1.16.0
126 webencodings==0.5.1
126 webencodings==0.5.1
127 defusedxml==0.7.1
127 defusedxml==0.7.1
128 jinja2==3.1.2
128 jinja2==3.1.2
129 markupsafe==2.1.2
129 markupsafe==2.1.2
130 jupyter_core==5.3.1
130 jupyter_core==5.3.1
131 platformdirs==3.10.0
131 platformdirs==3.10.0
132 traitlets==5.9.0
132 traitlets==5.9.0
133 jupyterlab-pygments==0.2.2
133 jupyterlab-pygments==0.2.2
134 markupsafe==2.1.2
134 markupsafe==2.1.2
135 mistune==2.0.5
135 mistune==2.0.5
136 nbclient==0.8.0
136 nbclient==0.8.0
137 jupyter_client==8.3.0
137 jupyter_client==8.3.0
138 jupyter_core==5.3.1
138 jupyter_core==5.3.1
139 platformdirs==3.10.0
139 platformdirs==3.10.0
140 traitlets==5.9.0
140 traitlets==5.9.0
141 python-dateutil==2.8.2
141 python-dateutil==2.8.2
142 six==1.16.0
142 six==1.16.0
143 pyzmq==25.0.0
143 pyzmq==25.0.0
144 tornado==6.2
144 tornado==6.2
145 traitlets==5.9.0
145 traitlets==5.9.0
146 jupyter_core==5.3.1
146 jupyter_core==5.3.1
147 platformdirs==3.10.0
147 platformdirs==3.10.0
148 traitlets==5.9.0
148 traitlets==5.9.0
149 nbformat==5.9.2
149 nbformat==5.9.2
150 fastjsonschema==2.18.0
150 fastjsonschema==2.18.0
151 jsonschema==4.18.6
151 jsonschema==4.18.6
152 attrs==22.2.0
152 attrs==22.2.0
153 pyrsistent==0.19.3
153 pyrsistent==0.19.3
154 jupyter_core==5.3.1
154 jupyter_core==5.3.1
155 platformdirs==3.10.0
155 platformdirs==3.10.0
156 traitlets==5.9.0
156 traitlets==5.9.0
157 traitlets==5.9.0
157 traitlets==5.9.0
158 traitlets==5.9.0
158 traitlets==5.9.0
159 nbformat==5.9.2
159 nbformat==5.9.2
160 fastjsonschema==2.18.0
160 fastjsonschema==2.18.0
161 jsonschema==4.18.6
161 jsonschema==4.18.6
162 attrs==22.2.0
162 attrs==22.2.0
163 pyrsistent==0.19.3
163 pyrsistent==0.19.3
164 jupyter_core==5.3.1
164 jupyter_core==5.3.1
165 platformdirs==3.10.0
165 platformdirs==3.10.0
166 traitlets==5.9.0
166 traitlets==5.9.0
167 traitlets==5.9.0
167 traitlets==5.9.0
168 packaging==23.1
168 packaging==23.1
169 pandocfilters==1.5.0
169 pandocfilters==1.5.0
170 pygments==2.15.1
170 pygments==2.15.1
171 tinycss2==1.2.1
171 tinycss2==1.2.1
172 webencodings==0.5.1
172 webencodings==0.5.1
173 traitlets==5.9.0
173 traitlets==5.9.0
174 orjson==3.9.13
174 orjson==3.9.13
175 pastescript==3.4.0
175 pastescript==3.4.0
176 paste==3.7.1
176 paste==3.7.1
177 six==1.16.0
177 six==1.16.0
178 pastedeploy==3.1.0
178 pastedeploy==3.1.0
179 six==1.16.0
179 six==1.16.0
180 premailer==3.10.0
180 premailer==3.10.0
181 cachetools==5.3.2
181 cachetools==5.3.2
182 cssselect==1.2.0
182 cssselect==1.2.0
183 cssutils==2.6.0
183 cssutils==2.6.0
184 lxml==4.9.3
184 lxml==4.9.3
185 requests==2.28.2
185 requests==2.28.2
186 certifi==2022.12.7
186 certifi==2022.12.7
187 charset-normalizer==3.1.0
187 charset-normalizer==3.1.0
188 idna==3.4
188 idna==3.4
189 urllib3==1.26.14
189 urllib3==1.26.14
190 psutil==5.9.8
190 psutil==5.9.8
191 psycopg2==2.9.9
191 psycopg2==2.9.9
192 py-bcrypt==0.4
192 py-bcrypt==0.4
193 pycmarkgfm==1.2.0
193 pycmarkgfm==1.2.0
194 cffi==1.16.0
194 cffi==1.16.0
195 pycparser==2.21
195 pycparser==2.21
196 pycryptodome==3.17
196 pycryptodome==3.17
197 pycurl==7.45.2
197 pycurl==7.45.2
198 pymysql==1.0.3
198 pymysql==1.0.3
199 pyotp==2.8.0
199 pyotp==2.8.0
200 pyparsing==3.1.1
200 pyparsing==3.1.1
201 pyramid-debugtoolbar==4.11
201 pyramid-debugtoolbar==4.11
202 pygments==2.15.1
202 pygments==2.15.1
203 pyramid==2.0.2
203 pyramid==2.0.2
204 hupper==1.12
204 hupper==1.12
205 plaster==1.1.2
205 plaster==1.1.2
206 plaster-pastedeploy==1.0.1
206 plaster-pastedeploy==1.0.1
207 pastedeploy==3.1.0
207 pastedeploy==3.1.0
208 plaster==1.1.2
208 plaster==1.1.2
209 translationstring==1.4
209 translationstring==1.4
210 venusian==3.0.0
210 venusian==3.0.0
211 webob==1.8.7
211 webob==1.8.7
212 zope.deprecation==5.0.0
212 zope.deprecation==5.0.0
213 zope.interface==6.1.0
213 zope.interface==6.1.0
214 pyramid-mako==1.1.0
214 pyramid-mako==1.1.0
215 mako==1.2.4
215 mako==1.2.4
216 markupsafe==2.1.2
216 markupsafe==2.1.2
217 pyramid==2.0.2
217 pyramid==2.0.2
218 hupper==1.12
218 hupper==1.12
219 plaster==1.1.2
219 plaster==1.1.2
220 plaster-pastedeploy==1.0.1
220 plaster-pastedeploy==1.0.1
221 pastedeploy==3.1.0
221 pastedeploy==3.1.0
222 plaster==1.1.2
222 plaster==1.1.2
223 translationstring==1.4
223 translationstring==1.4
224 venusian==3.0.0
224 venusian==3.0.0
225 webob==1.8.7
225 webob==1.8.7
226 zope.deprecation==5.0.0
226 zope.deprecation==5.0.0
227 zope.interface==6.1.0
227 zope.interface==6.1.0
228 pyramid-mailer==0.15.1
228 pyramid-mailer==0.15.1
229 pyramid==2.0.2
229 pyramid==2.0.2
230 hupper==1.12
230 hupper==1.12
231 plaster==1.1.2
231 plaster==1.1.2
232 plaster-pastedeploy==1.0.1
232 plaster-pastedeploy==1.0.1
233 pastedeploy==3.1.0
233 pastedeploy==3.1.0
234 plaster==1.1.2
234 plaster==1.1.2
235 translationstring==1.4
235 translationstring==1.4
236 venusian==3.0.0
236 venusian==3.0.0
237 webob==1.8.7
237 webob==1.8.7
238 zope.deprecation==5.0.0
238 zope.deprecation==5.0.0
239 zope.interface==6.1.0
239 zope.interface==6.1.0
240 repoze.sendmail==4.4.1
240 repoze.sendmail==4.4.1
241 transaction==3.1.0
241 transaction==3.1.0
242 zope.interface==6.1.0
242 zope.interface==6.1.0
243 zope.interface==6.1.0
243 zope.interface==6.1.0
244 transaction==3.1.0
244 transaction==3.1.0
245 zope.interface==6.1.0
245 zope.interface==6.1.0
246 python-ldap==3.4.3
246 python-ldap==3.4.3
247 pyasn1==0.4.8
247 pyasn1==0.4.8
248 pyasn1-modules==0.2.8
248 pyasn1-modules==0.2.8
249 pyasn1==0.4.8
249 pyasn1==0.4.8
250 python-memcached==1.59
250 python-memcached==1.59
251 six==1.16.0
251 six==1.16.0
252 python-pam==2.0.2
252 python-pam==2.0.2
253 python3-saml==1.15.0
253 python3-saml==1.15.0
254 isodate==0.6.1
254 isodate==0.6.1
255 six==1.16.0
255 six==1.16.0
256 lxml==4.9.3
256 lxml==4.9.3
257 xmlsec==1.3.13
257 xmlsec==1.3.13
258 lxml==4.9.3
258 lxml==4.9.3
259 pyyaml==6.0.1
259 pyyaml==6.0.1
260 redis==5.0.1
260 redis==5.0.1
261 regex==2022.10.31
261 regex==2022.10.31
262 routes==2.5.1
262 routes==2.5.1
263 repoze.lru==0.7
263 repoze.lru==0.7
264 six==1.16.0
264 six==1.16.0
265 simplejson==3.19.1
265 simplejson==3.19.1
266 sshpubkeys==3.3.1
266 sshpubkeys==3.3.1
267 cryptography==40.0.2
267 cryptography==40.0.2
268 cffi==1.16.0
268 cffi==1.16.0
269 pycparser==2.21
269 pycparser==2.21
270 ecdsa==0.18.0
270 ecdsa==0.18.0
271 six==1.16.0
271 six==1.16.0
272 sqlalchemy==1.4.51
272 sqlalchemy==1.4.51
273 greenlet==3.0.3
273 greenlet==3.0.3
274 typing_extensions==4.9.0
274 typing_extensions==4.9.0
275 supervisor==4.2.5
275 supervisor==4.2.5
276 tzlocal==4.3
276 tzlocal==4.3
277 pytz-deprecation-shim==0.1.0.post0
277 pytz-deprecation-shim==0.1.0.post0
278 tzdata==2023.4
278 tzdata==2023.4
279 unidecode==1.3.6
279 unidecode==1.3.6
280 urlobject==2.4.3
280 urlobject==2.4.3
281 waitress==3.0.0
281 waitress==3.0.0
282 weberror==0.13.1
282 weberror==0.13.1
283 paste==3.7.1
283 paste==3.7.1
284 six==1.16.0
284 six==1.16.0
285 pygments==2.15.1
285 pygments==2.15.1
286 tempita==0.5.2
286 tempita==0.5.2
287 webob==1.8.7
287 webob==1.8.7
288 webhelpers2==2.0
288 webhelpers2==2.0
289 markupsafe==2.1.2
289 markupsafe==2.1.2
290 six==1.16.0
290 six==1.16.0
291 whoosh==2.7.4
291 whoosh==2.7.4
292 zope.cachedescriptors==5.0.0
292 zope.cachedescriptors==5.0.0
293
293
294 ## uncomment to add the debug libraries
294 ## uncomment to add the debug libraries
295 #-r requirements_debug.txt
295 #-r requirements_debug.txt
@@ -1,93 +1,92 b''
1 # Copyright (C) 2010-2023 RhodeCode GmbH
1 # Copyright (C) 2010-2023 RhodeCode GmbH
2 #
2 #
3 # This program is free software: you can redistribute it and/or modify
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU Affero General Public License, version 3
4 # it under the terms of the GNU Affero General Public License, version 3
5 # (only), as published by the Free Software Foundation.
5 # (only), as published by the Free Software Foundation.
6 #
6 #
7 # This program is distributed in the hope that it will be useful,
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 # GNU General Public License for more details.
10 # GNU General Public License for more details.
11 #
11 #
12 # You should have received a copy of the GNU Affero General Public License
12 # You should have received a copy of the GNU Affero General Public License
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 #
14 #
15 # This program is dual-licensed. If you wish to learn more about the
15 # This program is dual-licensed. If you wish to learn more about the
16 # RhodeCode Enterprise Edition, including its added features, Support services,
16 # RhodeCode Enterprise Edition, including its added features, Support services,
17 # and proprietary license terms, please see https://rhodecode.com/licenses/
17 # and proprietary license terms, please see https://rhodecode.com/licenses/
18
18
19 import socket
19 import socket
20 import logging
20 import logging
21
21
22 import rhodecode
22 import rhodecode
23 from zope.cachedescriptors.property import Lazy as LazyProperty
23 from zope.cachedescriptors.property import Lazy as LazyProperty
24 from rhodecode.lib.celerylib.loader import (
24 from rhodecode.lib.celerylib.loader import (
25 celery_app, RequestContextTask, get_logger)
25 celery_app, RequestContextTask, get_logger)
26 from rhodecode.lib.statsd_client import StatsdClient
26 from rhodecode.lib.statsd_client import StatsdClient
27
27
28 async_task = celery_app.task
28 async_task = celery_app.task
29
29
30
30
31 log = logging.getLogger(__name__)
31 log = logging.getLogger(__name__)
32
32
33
33
34 class ResultWrapper(object):
34 class ResultWrapper(object):
35 def __init__(self, task):
35 def __init__(self, task):
36 self.task = task
36 self.task = task
37
37
38 @LazyProperty
38 @LazyProperty
39 def result(self):
39 def result(self):
40 return self.task
40 return self.task
41
41
42
42
43 def run_task(task, *args, **kwargs):
43 def run_task(task, *args, **kwargs):
44 import celery
44 import celery
45 log.debug('Got task `%s` for execution, celery mode enabled:%s', task, rhodecode.CELERY_ENABLED)
45 log.debug('Got task `%s` for execution, celery mode enabled:%s', task, rhodecode.CELERY_ENABLED)
46 if task is None:
46 if task is None:
47 raise ValueError(f'Got non-existing task: {task} for execution')
47 raise ValueError(f'Got non-existing task: {task} for execution')
48
48
49 exec_mode = 'sync'
50 allow_async = True
49 allow_async = True
51
50
52 # if we're already in a celery task, don't allow async execution again
51 # if we're already in a celery task, don't allow async execution again
53 # e.g task within task
52 # e.g task within task
54 in_task = celery.current_task
53 in_task = celery.current_task
55 if in_task:
54 if in_task:
56 log.debug('This task in in context of another task: %s, not allowing another async execution', in_task)
55 log.debug('This task in in context of another task: %s, not allowing another async execution', in_task)
57 allow_async = False
56 allow_async = False
58 if kwargs.pop('allow_subtask', False):
57 if kwargs.pop('allow_subtask', False):
59 log.debug('Forced async by allow_async=True flag')
58 log.debug('Forced async by allow_async=True flag')
60 allow_async = True
59 allow_async = True
61
60
62 t = None
61 t = None
63 if rhodecode.CELERY_ENABLED and allow_async:
62 if rhodecode.CELERY_ENABLED and allow_async:
64
63
65 try:
64 try:
66 t = task.apply_async(args=args, kwargs=kwargs)
65 t = task.apply_async(args=args, kwargs=kwargs)
67 log.debug('executing task %s:%s in async mode', t.task_id, task)
66 log.debug('executing task %s:%s in async mode', t.task_id, task)
68 except socket.error as e:
67 except socket.error as e:
69 if isinstance(e, IOError) and e.errno == 111:
68 if isinstance(e, IOError) and e.errno == 111:
70 log.error('Unable to connect to celeryd `%s`. Sync execution', e)
69 log.error('Unable to connect to celeryd `%s`. Sync execution', e)
71 else:
70 else:
72 log.exception("Exception while connecting to celeryd.")
71 log.exception("Exception while connecting to celeryd.")
73 except KeyError as e:
72 except KeyError as e:
74 log.error('Unable to connect to celeryd `%s`. Sync execution', e)
73 log.error('Unable to connect to celeryd `%s`. Sync execution', e)
75 except Exception as e:
74 except Exception as e:
76 log.exception(
75 log.exception(
77 "Exception while trying to run task asynchronous. "
76 "Exception while trying to run task asynchronous. "
78 "Fallback to sync execution.")
77 "Fallback to sync execution.")
79
78
80 else:
79 else:
81 log.debug('executing task %s:%s in sync mode', 'TASK', task)
80 log.debug('executing task %s:%s in sync mode', 'TASK', task)
82 statsd = StatsdClient.statsd
81 statsd = StatsdClient.statsd
83 if statsd:
82 if statsd:
84 task_repr = getattr(task, 'name', task)
83 task_repr = getattr(task, 'name', task)
85 statsd.incr('rhodecode_celery_task_total', tags=[
84 statsd.incr('rhodecode_celery_task_total', tags=[
86 f'task:{task_repr}',
85 f'task:{task_repr}',
87 'mode:sync'
86 'mode:sync'
88 ])
87 ])
89
88
90 # we got async task, return it after statsd call
89 # we got async task, return it after statsd call
91 if t:
90 if t:
92 return t
91 return t
93 return ResultWrapper(task(*args, **kwargs))
92 return ResultWrapper(task(*args, **kwargs))
General Comments 0
You need to be logged in to leave comments. Login now