frappe / press

Full service cloud hosting for the Frappe stack - powers Frappe Cloud
https://frappe.cloud
GNU Affero General Public License v3.0
250 stars 176 forks source link

ValidationError: Queue should be one of short, default, long #1826

Open wintogeno opened 3 months ago

wintogeno commented 3 months ago

I have a Setup a Complete Servers According to the Documentation but facing this error when i created a Deploy Candidate and Click on Build and Deploy Button /home/press/frappe-bench/apps/frappe/frappe/handler.py:74: DeprecationWarning: Calling shorthand for run_doc_method is deprecated, please specify full path in RPC call. 13:43:25 web.1 | method = get_attr(cmd) 13:43:25 web.1 | Traceback (most recent call last): 13:43:25 web.1 | File "apps/frappe/frappe/app.py", line 110, in application 13:43:25 web.1 | response = frappe.api.handle(request) 13:43:25 web.1 | File "apps/frappe/frappe/api/init.py", line 49, in handle 13:43:25 web.1 | data = endpoint(arguments) 13:43:25 web.1 | File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call 13:43:25 web.1 | return frappe.handler.handle() 13:43:25 web.1 | File "apps/frappe/frappe/handler.py", line 49, in handle 13:43:25 web.1 | data = execute_cmd(cmd) 13:43:25 web.1 | File "apps/frappe/frappe/handler.py", line 85, in execute_cmd 13:43:25 web.1 | return frappe.call(method, frappe.form_dict) 13:43:25 web.1 | File "apps/frappe/frappe/init.py", line 1768, in call 13:43:25 web.1 | return fn(*args, newargs) 13:43:25 web.1 | File "apps/frappe/frappe/handler.py", line 333, in run_doc_method 13:43:25 web.1 | response = doc.run_method(method, args) 13:43:25 web.1 | File "apps/frappe/frappe/model/document.py", line 962, in run_method 13:43:25 web.1 | out = Document.hook(fn)(self, *args, *kwargs) 13:43:25 web.1 | File "apps/frappe/frappe/model/document.py", line 1322, in composer 13:43:25 web.1 | return composed(self, method, args, kwargs) 13:43:25 web.1 | File "apps/frappe/frappe/model/document.py", line 1304, in runner 13:43:25 web.1 | add_to_return_value(self, fn(self, *args, kwargs)) 13:43:25 web.1 | File "apps/frappe/frappe/model/document.py", line 959, in fn 13:43:25 web.1 | return method_object(*args, *kwargs) 13:43:25 web.1 | File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper 13:43:25 web.1 | return func(args, kwargs) 13:43:25 web.1 | File "apps/press/press/press/doctype/deploy_candidate/deploy_candidate.py", line 325, in schedule_build_and_deploy 13:43:25 web.1 | self.build_and_deploy() 13:43:25 web.1 | File "apps/press/press/press/doctype/deploy_candidate/deploy_candidate.py", line 335, in build_and_deploy 13:43:25 web.1 | self.pre_build(method="_build_and_deploy") 13:43:25 web.1 | File "apps/press/press/press/doctype/deploy_candidate/deploy_candidate.py", line 236, in pre_build 13:43:25 web.1 | frappe.enqueue_doc( 13:43:25 web.1 | File "apps/frappe/frappe/init.py", line 2329, in enqueue_doc 13:43:25 web.1 | return frappe.utils.background_jobs.enqueue_doc(*args, **kwargs) 13:43:25 web.1 | File "apps/frappe/frappe/utils/background_jobs.py", line 173, in enqueue_doc 13:43:25 web.1 | return enqueue( 13:43:25 web.1 | File "apps/frappe/frappe/utils/background_jobs.py", line 121, in enqueue 13:43:25 web.1 | q = get_queue(queue, is_async=is_async) 13:43:25 web.1 | File "apps/frappe/frappe/utils/background_jobs.py", line 431, in get_queue 13:43:25 web.1 | validate_queue(qtype) 13:43:25 web.1 | File "apps/frappe/frappe/utils/background_jobs.py", line 440, in validatequeue 13:43:25 web.1 | frappe.throw(("Queue should be one of {0}").format(", ".join(default_queue_list))) 13:43:25 web.1 | File "apps/frappe/frappe/init.py", line 645, in throw 13:43:25 web.1 | msgprint( 13:43:25 web.1 | File "apps/frappe/frappe/init.py", line 610, in msgprint 13:43:25 web.1 | _raise_exception() 13:43:25 web.1 | File "apps/frappe/frappe/init.py", line 561, in _raise_exception 13:43:25 web.1 | raise exc 13:43:25 web.1 | frappe.exceptions.ValidationError: Queue should be one of short, default, long 13:43:25 web.1 | 13:43:25 web.1 | 192.168.10.40 - - [29/May/2024 13:43:25] "POST /api/method/run_doc_method HTTP/1.0" 417 -

this is database server Screenshot from 2024-05-29 18-48-33 this is my proxy server Screenshot from 2024-05-29 18-49-44 this is my server list Screenshot from 2024-05-29 18-50-51

Kindly help me I setup the servers the server are able to login to Each other. the server can also ping agent all the ansible jobs are running smooth. the agent is setup but facing this error

cogk commented 3 months ago

You need to create a new queue called build in common_site_config.json.

https://discuss.frappe.io/t/frappe-exceptions-validationerror-queue-should-be-one-of-short-default-long-in-frappe-press/124305

casesolved-co-uk commented 3 weeks ago

Here's an example:

{
...
 "workers": {
  "build": {
   "background_workers": 1,
   "timeout": 5000
  }
 }
}

$ bench setup supervisor $ bench restart https://frappeframework.com/docs/user/en/basics/site_config#optional-settings