##// END OF EJS Templates
tests: fixes for gunicorn tests workers
marcink -
r2455:82863912 default
parent child Browse files
Show More
@@ -173,9 +173,9 b' def rc_web_server('
173 assert_no_running_instance(host_url)
173 assert_no_running_instance(host_url)
174 command = ['gunicorn', '--worker-class', 'gevent', '--paste', rc_web_server_config]
174 command = ['gunicorn', '--worker-class', 'gevent', '--paste', rc_web_server_config]
175
175
176 print('Starting rhodecode server: {}'.format(host_url))
176 print('rhodecode-web starting at: {}'.format(host_url))
177 print('Command: {}'.format(command))
177 print('rhodecode-web command: {}'.format(command))
178 print('Logfile: {}'.format(rc_log))
178 print('rhodecode-web logfile: {}'.format(rc_log))
179
179
180 proc = subprocess32.Popen(
180 proc = subprocess32.Popen(
181 command, bufsize=0, env=env, stdout=server_out, stderr=server_out)
181 command, bufsize=0, env=env, stdout=server_out, stderr=server_out)
@@ -52,7 +52,8 b' def rc_web_server_config(testini_factory'
52 def test_git_clone_with_small_push_buffer(backend_git, rc_web_server, tmpdir):
52 def test_git_clone_with_small_push_buffer(backend_git, rc_web_server, tmpdir):
53 clone_url = rc_web_server.repo_clone_url(GIT_REPO)
53 clone_url = rc_web_server.repo_clone_url(GIT_REPO)
54 cmd = Command('/tmp')
54 cmd = Command('/tmp')
55 stdout, stderr = cmd.execute('git -c http.postBuffer=1024 clone', clone_url, tmpdir.strpath)
55 stdout, stderr = cmd.execute(
56 'git -c http.postBuffer=1024 clone', clone_url, tmpdir.strpath)
56 _check_proper_clone(stdout, stderr, 'git')
57 _check_proper_clone(stdout, stderr, 'git')
57 cmd.assert_returncode_success()
58 cmd.assert_returncode_success()
58
59
@@ -73,5 +74,6 b' def test_git_push_with_small_push_buffer'
73 branch='master')
74 branch='master')
74
75
75 repo_cmd = Command(repo.path)
76 repo_cmd = Command(repo.path)
76 stdout, stderr = repo_cmd.execute('git -c http.postBuffer=1024 push --verbose origin master')
77 stdout, stderr = repo_cmd.execute(
78 'git -c http.postBuffer=1024 push --verbose origin master')
77 _check_proper_git_push(stdout, stderr, branch='master')
79 _check_proper_git_push(stdout, stderr, branch='master')
@@ -49,6 +49,11 b' from rhodecode.tests.other.vcs_operation'
49 HG_REPO_WITH_GROUP, GIT_REPO_WITH_GROUP)
49 HG_REPO_WITH_GROUP, GIT_REPO_WITH_GROUP)
50
50
51
51
52 @pytest.fixture(scope="session")
53 def vcs_server_config_override():
54 return ({'server:main': {'workers': 2}},)
55
56
52 @pytest.mark.usefixtures("disable_locking", "disable_anonymous_user")
57 @pytest.mark.usefixtures("disable_locking", "disable_anonymous_user")
53 class TestVCSOperations(object):
58 class TestVCSOperations(object):
54
59
@@ -464,215 +469,214 b' class TestVCSOperations(object):'
464 assert 'abort: authorization failed' in stderr
469 assert 'abort: authorization failed' in stderr
465
470
466
471
467 def test_git_sets_default_branch_if_not_master(
472 @pytest.mark.usefixtures("disable_locking")
468 backend_git, tmpdir, disable_locking, rc_web_server):
473 class TestVCSOperationsSpecial(object):
469 empty_repo = backend_git.create_repo()
470 clone_url = rc_web_server.repo_clone_url(empty_repo.repo_name)
471
474
472 cmd = Command(tmpdir.strpath)
475 def test_git_sets_default_branch_if_not_master(
473 cmd.execute('git clone', clone_url)
476 self, backend_git, tmpdir, rc_web_server):
477 empty_repo = backend_git.create_repo()
478 clone_url = rc_web_server.repo_clone_url(empty_repo.repo_name)
479
480 cmd = Command(tmpdir.strpath)
481 cmd.execute('git clone', clone_url)
474
482
475 repo = GitRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
483 repo = GitRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
476 repo.in_memory_commit.add(FileNode('file', content=''))
484 repo.in_memory_commit.add(FileNode('file', content=''))
477 repo.in_memory_commit.commit(
485 repo.in_memory_commit.commit(
478 message='Commit on branch test',
486 message='Commit on branch test',
479 author='Automatic test',
487 author='Automatic test',
480 branch='test')
488 branch='test')
481
489
482 repo_cmd = Command(repo.path)
490 repo_cmd = Command(repo.path)
483 stdout, stderr = repo_cmd.execute('git push --verbose origin test')
491 stdout, stderr = repo_cmd.execute('git push --verbose origin test')
484 _check_proper_git_push(
492 _check_proper_git_push(
485 stdout, stderr, branch='test', should_set_default_branch=True)
493 stdout, stderr, branch='test', should_set_default_branch=True)
486
487 stdout, stderr = cmd.execute(
488 'git clone', clone_url, empty_repo.repo_name + '-clone')
489 _check_proper_clone(stdout, stderr, 'git')
490
494
491 # Doing an explicit commit in order to get latest user logs on MySQL
495 stdout, stderr = cmd.execute(
492 Session().commit()
496 'git clone', clone_url, empty_repo.repo_name + '-clone')
493
497 _check_proper_clone(stdout, stderr, 'git')
494
498
495 def test_git_fetches_from_remote_repository_with_annotated_tags(
499 # Doing an explicit commit in order to get latest user logs on MySQL
496 backend_git, disable_locking, rc_web_server):
500 Session().commit()
497 # Note: This is a test specific to the git backend. It checks the
501
498 # integration of fetching from a remote repository which contains
502 def test_git_fetches_from_remote_repository_with_annotated_tags(
499 # annotated tags.
503 self, backend_git, rc_web_server):
504 # Note: This is a test specific to the git backend. It checks the
505 # integration of fetching from a remote repository which contains
506 # annotated tags.
500
507
501 # Dulwich shows this specific behavior only when
508 # Dulwich shows this specific behavior only when
502 # operating against a remote repository.
509 # operating against a remote repository.
503 source_repo = backend_git['annotated-tag']
510 source_repo = backend_git['annotated-tag']
504 target_vcs_repo = backend_git.create_repo().scm_instance()
511 target_vcs_repo = backend_git.create_repo().scm_instance()
505 target_vcs_repo.fetch(rc_web_server.repo_clone_url(source_repo.repo_name))
512 target_vcs_repo.fetch(rc_web_server.repo_clone_url(source_repo.repo_name))
506
507
513
508 def test_git_push_shows_pull_request_refs(backend_git, rc_web_server, tmpdir):
514 def test_git_push_shows_pull_request_refs(self, backend_git, rc_web_server, tmpdir):
509 """
515 """
510 test if remote info about refs is visible
516 test if remote info about refs is visible
511 """
517 """
512 empty_repo = backend_git.create_repo()
518 empty_repo = backend_git.create_repo()
513
519
514 clone_url = rc_web_server.repo_clone_url(empty_repo.repo_name)
520 clone_url = rc_web_server.repo_clone_url(empty_repo.repo_name)
515
521
516 cmd = Command(tmpdir.strpath)
522 cmd = Command(tmpdir.strpath)
517 cmd.execute('git clone', clone_url)
523 cmd.execute('git clone', clone_url)
518
524
519 repo = GitRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
525 repo = GitRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
520 repo.in_memory_commit.add(FileNode('readme.md', content='## Hello'))
526 repo.in_memory_commit.add(FileNode('readme.md', content='## Hello'))
521 repo.in_memory_commit.commit(
527 repo.in_memory_commit.commit(
522 message='Commit on branch Master',
528 message='Commit on branch Master',
523 author='Automatic test',
529 author='Automatic test',
524 branch='master')
530 branch='master')
525
531
526 repo_cmd = Command(repo.path)
532 repo_cmd = Command(repo.path)
527 stdout, stderr = repo_cmd.execute('git push --verbose origin master')
533 stdout, stderr = repo_cmd.execute('git push --verbose origin master')
528 _check_proper_git_push(stdout, stderr, branch='master')
534 _check_proper_git_push(stdout, stderr, branch='master')
529
535
530 ref = '{}/{}/pull-request/new?branch=master'.format(
536 ref = '{}/{}/pull-request/new?branch=master'.format(
531 rc_web_server.host_url(), empty_repo.repo_name)
537 rc_web_server.host_url(), empty_repo.repo_name)
532 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stderr
538 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stderr
533 assert 'remote: RhodeCode: push completed' in stderr
539 assert 'remote: RhodeCode: push completed' in stderr
534
540
535 # push on the same branch
541 # push on the same branch
536 repo = GitRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
542 repo = GitRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
537 repo.in_memory_commit.add(FileNode('setup.py', content='print\n'))
543 repo.in_memory_commit.add(FileNode('setup.py', content='print\n'))
538 repo.in_memory_commit.commit(
544 repo.in_memory_commit.commit(
539 message='Commit2 on branch Master',
545 message='Commit2 on branch Master',
540 author='Automatic test2',
546 author='Automatic test2',
541 branch='master')
547 branch='master')
542
548
543 repo_cmd = Command(repo.path)
549 repo_cmd = Command(repo.path)
544 stdout, stderr = repo_cmd.execute('git push --verbose origin master')
550 stdout, stderr = repo_cmd.execute('git push --verbose origin master')
545 _check_proper_git_push(stdout, stderr, branch='master')
551 _check_proper_git_push(stdout, stderr, branch='master')
546
547 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stderr
548 assert 'remote: RhodeCode: push completed' in stderr
549
552
550 # new Branch
553 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stderr
551 repo = GitRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
554 assert 'remote: RhodeCode: push completed' in stderr
552 repo.in_memory_commit.add(FileNode('feature1.py', content='## Hello world'))
553 repo.in_memory_commit.commit(
554 message='Commit on branch feature',
555 author='Automatic test',
556 branch='feature')
557
555
558 repo_cmd = Command(repo.path)
556 # new Branch
559 stdout, stderr = repo_cmd.execute('git push --verbose origin feature')
557 repo = GitRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
560 _check_proper_git_push(stdout, stderr, branch='feature')
558 repo.in_memory_commit.add(FileNode('feature1.py', content='## Hello world'))
559 repo.in_memory_commit.commit(
560 message='Commit on branch feature',
561 author='Automatic test',
562 branch='feature')
561
563
562 ref = '{}/{}/pull-request/new?branch=feature'.format(
564 repo_cmd = Command(repo.path)
563 rc_web_server.host_url(), empty_repo.repo_name)
565 stdout, stderr = repo_cmd.execute('git push --verbose origin feature')
564 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stderr
566 _check_proper_git_push(stdout, stderr, branch='feature')
565 assert 'remote: RhodeCode: push completed' in stderr
566
567
568 ref = '{}/{}/pull-request/new?branch=feature'.format(
569 rc_web_server.host_url(), empty_repo.repo_name)
570 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stderr
571 assert 'remote: RhodeCode: push completed' in stderr
567
572
568 def test_hg_push_shows_pull_request_refs(backend_hg, rc_web_server, tmpdir):
573 def test_hg_push_shows_pull_request_refs(self, backend_hg, rc_web_server, tmpdir):
569 empty_repo = backend_hg.create_repo()
574 empty_repo = backend_hg.create_repo()
570
575
571 clone_url = rc_web_server.repo_clone_url(empty_repo.repo_name)
576 clone_url = rc_web_server.repo_clone_url(empty_repo.repo_name)
572
577
573 cmd = Command(tmpdir.strpath)
578 cmd = Command(tmpdir.strpath)
574 cmd.execute('hg clone', clone_url)
579 cmd.execute('hg clone', clone_url)
575
580
576 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
581 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
577 repo.in_memory_commit.add(FileNode(u'readme.md', content=u'## Hello'))
582 repo.in_memory_commit.add(FileNode(u'readme.md', content=u'## Hello'))
578 repo.in_memory_commit.commit(
583 repo.in_memory_commit.commit(
579 message=u'Commit on branch default',
584 message=u'Commit on branch default',
580 author=u'Automatic test',
585 author=u'Automatic test',
581 branch='default')
586 branch='default')
582
587
583 repo_cmd = Command(repo.path)
588 repo_cmd = Command(repo.path)
584 repo_cmd.execute('hg checkout default')
589 repo_cmd.execute('hg checkout default')
585
590
586 stdout, stderr = repo_cmd.execute('hg push --verbose', clone_url)
591 stdout, stderr = repo_cmd.execute('hg push --verbose', clone_url)
587 _check_proper_hg_push(stdout, stderr, branch='default')
592 _check_proper_hg_push(stdout, stderr, branch='default')
588
593
589 ref = '{}/{}/pull-request/new?branch=default'.format(
594 ref = '{}/{}/pull-request/new?branch=default'.format(
590 rc_web_server.host_url(), empty_repo.repo_name)
595 rc_web_server.host_url(), empty_repo.repo_name)
591 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
596 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
592 assert 'remote: RhodeCode: push completed' in stdout
597 assert 'remote: RhodeCode: push completed' in stdout
593
598
594 # push on the same branch
599 # push on the same branch
595 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
600 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
596 repo.in_memory_commit.add(FileNode(u'setup.py', content=u'print\n'))
601 repo.in_memory_commit.add(FileNode(u'setup.py', content=u'print\n'))
597 repo.in_memory_commit.commit(
602 repo.in_memory_commit.commit(
598 message=u'Commit2 on branch default',
603 message=u'Commit2 on branch default',
599 author=u'Automatic test2',
604 author=u'Automatic test2',
600 branch=u'default')
605 branch=u'default')
601
606
602 repo_cmd = Command(repo.path)
607 repo_cmd = Command(repo.path)
603 repo_cmd.execute('hg checkout default')
608 repo_cmd.execute('hg checkout default')
604
609
605 stdout, stderr = repo_cmd.execute('hg push --verbose', clone_url)
610 stdout, stderr = repo_cmd.execute('hg push --verbose', clone_url)
606 _check_proper_hg_push(stdout, stderr, branch='default')
611 _check_proper_hg_push(stdout, stderr, branch='default')
607
612
608 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
613 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
609 assert 'remote: RhodeCode: push completed' in stdout
614 assert 'remote: RhodeCode: push completed' in stdout
610
615
611 # new Branch
616 # new Branch
612 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
617 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
613 repo.in_memory_commit.add(FileNode(u'feature1.py', content=u'## Hello world'))
618 repo.in_memory_commit.add(FileNode(u'feature1.py', content=u'## Hello world'))
614 repo.in_memory_commit.commit(
619 repo.in_memory_commit.commit(
615 message=u'Commit on branch feature',
620 message=u'Commit on branch feature',
616 author=u'Automatic test',
621 author=u'Automatic test',
617 branch=u'feature')
622 branch=u'feature')
618
623
619 repo_cmd = Command(repo.path)
624 repo_cmd = Command(repo.path)
620 repo_cmd.execute('hg checkout feature')
625 repo_cmd.execute('hg checkout feature')
621
626
622 stdout, stderr = repo_cmd.execute('hg push --new-branch --verbose', clone_url)
627 stdout, stderr = repo_cmd.execute('hg push --new-branch --verbose', clone_url)
623 _check_proper_hg_push(stdout, stderr, branch='feature')
628 _check_proper_hg_push(stdout, stderr, branch='feature')
624
629
625 ref = '{}/{}/pull-request/new?branch=feature'.format(
630 ref = '{}/{}/pull-request/new?branch=feature'.format(
626 rc_web_server.host_url(), empty_repo.repo_name)
631 rc_web_server.host_url(), empty_repo.repo_name)
627 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
632 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
628 assert 'remote: RhodeCode: push completed' in stdout
633 assert 'remote: RhodeCode: push completed' in stdout
629
634
635 def test_hg_push_shows_pull_request_refs_book(self, backend_hg, rc_web_server, tmpdir):
636 empty_repo = backend_hg.create_repo()
630
637
631 def test_hg_push_shows_pull_request_refs_book(backend_hg, rc_web_server, tmpdir):
638 clone_url = rc_web_server.repo_clone_url(empty_repo.repo_name)
632 empty_repo = backend_hg.create_repo()
633
639
634 clone_url = rc_web_server.repo_clone_url(empty_repo.repo_name)
640 cmd = Command(tmpdir.strpath)
641 cmd.execute('hg clone', clone_url)
635
642
636 cmd = Command(tmpdir.strpath)
643 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
637 cmd.execute('hg clone', clone_url)
644 repo.in_memory_commit.add(FileNode(u'readme.md', content=u'## Hello'))
645 repo.in_memory_commit.commit(
646 message=u'Commit on branch default',
647 author=u'Automatic test',
648 branch='default')
638
649
639 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
650 repo_cmd = Command(repo.path)
640 repo.in_memory_commit.add(FileNode(u'readme.md', content=u'## Hello'))
651 repo_cmd.execute('hg checkout default')
641 repo.in_memory_commit.commit(
642 message=u'Commit on branch default',
643 author=u'Automatic test',
644 branch='default')
645
652
646 repo_cmd = Command(repo.path)
653 stdout, stderr = repo_cmd.execute('hg push --verbose', clone_url)
647 repo_cmd.execute('hg checkout default')
654 _check_proper_hg_push(stdout, stderr, branch='default')
648
649 stdout, stderr = repo_cmd.execute('hg push --verbose', clone_url)
650 _check_proper_hg_push(stdout, stderr, branch='default')
651
655
652 ref = '{}/{}/pull-request/new?branch=default'.format(
656 ref = '{}/{}/pull-request/new?branch=default'.format(
653 rc_web_server.host_url(), empty_repo.repo_name)
657 rc_web_server.host_url(), empty_repo.repo_name)
654 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
658 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
655 assert 'remote: RhodeCode: push completed' in stdout
659 assert 'remote: RhodeCode: push completed' in stdout
656
660
657 # add bookmark
661 # add bookmark
658 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
662 repo = MercurialRepository(os.path.join(tmpdir.strpath, empty_repo.repo_name))
659 repo.in_memory_commit.add(FileNode(u'setup.py', content=u'print\n'))
663 repo.in_memory_commit.add(FileNode(u'setup.py', content=u'print\n'))
660 repo.in_memory_commit.commit(
664 repo.in_memory_commit.commit(
661 message=u'Commit2 on branch default',
665 message=u'Commit2 on branch default',
662 author=u'Automatic test2',
666 author=u'Automatic test2',
663 branch=u'default')
667 branch=u'default')
664
668
665 repo_cmd = Command(repo.path)
669 repo_cmd = Command(repo.path)
666 repo_cmd.execute('hg checkout default')
670 repo_cmd.execute('hg checkout default')
667 repo_cmd.execute('hg bookmark feature2')
671 repo_cmd.execute('hg bookmark feature2')
668 stdout, stderr = repo_cmd.execute('hg push -B feature2 --verbose', clone_url)
672 stdout, stderr = repo_cmd.execute('hg push -B feature2 --verbose', clone_url)
669 _check_proper_hg_push(stdout, stderr, branch='default')
673 _check_proper_hg_push(stdout, stderr, branch='default')
670
674
671 ref = '{}/{}/pull-request/new?branch=default'.format(
675 ref = '{}/{}/pull-request/new?branch=default'.format(
672 rc_web_server.host_url(), empty_repo.repo_name)
676 rc_web_server.host_url(), empty_repo.repo_name)
673 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
677 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
674 ref = '{}/{}/pull-request/new?bookmark=feature2'.format(
678 ref = '{}/{}/pull-request/new?bookmark=feature2'.format(
675 rc_web_server.host_url(), empty_repo.repo_name)
679 rc_web_server.host_url(), empty_repo.repo_name)
676 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
680 assert 'remote: RhodeCode: open pull request link: {}'.format(ref) in stdout
677 assert 'remote: RhodeCode: push completed' in stdout
681 assert 'remote: RhodeCode: push completed' in stdout
678 assert 'exporting bookmark feature2' in stdout
682 assert 'exporting bookmark feature2' in stdout
@@ -91,6 +91,11 b' def enable_webhook_push_integration(requ'
91 Session().commit()
91 Session().commit()
92
92
93
93
94 @pytest.fixture(scope="session")
95 def vcs_server_config_override():
96 return ({'server:main': {'workers': 2}},)
97
98
94 @pytest.mark.usefixtures(
99 @pytest.mark.usefixtures(
95 "disable_locking", "disable_anonymous_user",
100 "disable_locking", "disable_anonymous_user",
96 "enable_webhook_push_integration")
101 "enable_webhook_push_integration")
@@ -96,8 +96,17 b' def pytest_addoption(parser):'
96 "Start the VCSServer with HTTP protocol support.")
96 "Start the VCSServer with HTTP protocol support.")
97
97
98
98
99 @pytest.fixture(scope="session")
100 def vcs_server_config_override(request):
101 """
102 Allows injecting the overrides by specifying this inside test class
103 """
104
105 return ()
106
107
99 @pytest.fixture(scope='session')
108 @pytest.fixture(scope='session')
100 def vcsserver(request, vcsserver_port, vcsserver_factory):
109 def vcsserver(request, vcsserver_port, vcsserver_factory, vcs_server_config_override):
101 """
110 """
102 Session scope VCSServer.
111 Session scope VCSServer.
103
112
@@ -120,7 +129,8 b' def vcsserver(request, vcsserver_port, v'
120
129
121 use_http = _use_vcs_http_server(request.config)
130 use_http = _use_vcs_http_server(request.config)
122 return vcsserver_factory(
131 return vcsserver_factory(
123 request, use_http=use_http, vcsserver_port=vcsserver_port)
132 request, use_http=use_http, vcsserver_port=vcsserver_port,
133 overrides=vcs_server_config_override)
124
134
125
135
126 @pytest.fixture(scope='session')
136 @pytest.fixture(scope='session')
@@ -213,7 +223,7 b' class HttpVCSServer(VCSServer):'
213 config_data = configobj.ConfigObj(config_file)
223 config_data = configobj.ConfigObj(config_file)
214 self._config = config_data['server:main']
224 self._config = config_data['server:main']
215
225
216 args = ['gunicorn', '--workers', '1', '--paste', config_file]
226 args = ['gunicorn', '--paste', config_file]
217 self._args = args
227 self._args = args
218
228
219 @property
229 @property
@@ -232,9 +242,9 b' class HttpVCSServer(VCSServer):'
232 server_out = open(rc_log, 'w')
242 server_out = open(rc_log, 'w')
233
243
234 command = ' '.join(self._args)
244 command = ' '.join(self._args)
235 print('Starting rhodecode-vcsserver: {}'.format(host_url))
245 print('rhodecode-vcsserver starting at: {}'.format(host_url))
236 print('Command: {}'.format(command))
246 print('rhodecode-vcsserver command: {}'.format(command))
237 print('Logfile: {}'.format(rc_log))
247 print('rhodecode-vcsserver logfile: {}'.format(rc_log))
238 self.process = subprocess32.Popen(
248 self.process = subprocess32.Popen(
239 self._args, bufsize=0, env=env, stdout=server_out, stderr=server_out)
249 self._args, bufsize=0, env=env, stdout=server_out, stderr=server_out)
240
250
General Comments 0
You need to be logged in to leave comments. Login now