Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Ready #2812

Merged
merged 139 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 133 commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
c010c2c
Remove facade dependency on GithubTaskSession
ABrain7710 Apr 1, 2024
003ed25
remove facade session dependence on AugurConfig
ABrain7710 Apr 1, 2024
cc42353
Define database lib methods and use in commit analysis
ABrain7710 Apr 1, 2024
a070e71
Update trim commits to use db lib
ABrain7710 Apr 1, 2024
32af57e
Reduce dependency on session logger
ABrain7710 Apr 2, 2024
812e635
Update facade session to not depend on database session
ABrain7710 Apr 2, 2024
15d788b
Rename FacadeSession to FacadeHelper
ABrain7710 Apr 2, 2024
3258568
Add repo methods to lib
ABrain7710 Apr 2, 2024
b31baf3
Use get repo git
ABrain7710 Apr 3, 2024
5781e90
Add more facade lib methods
ABrain7710 Apr 3, 2024
0dcbb91
Move facade insert commits method to lib
ABrain7710 Apr 3, 2024
25638bd
Define bulk insert dicts to remove database session dependence
ABrain7710 Apr 3, 2024
b1ee4bd
Reduce dependence on database session using lib methods
ABrain7710 Apr 3, 2024
3772c23
Fix bulk upsert syntax issues
ABrain7710 Apr 3, 2024
995fa6e
Clean up lib year task session management
ABrain7710 Apr 6, 2024
a4602c5
Clean up db usage in dependency tasks
ABrain7710 Apr 6, 2024
688cee2
Clean up value model db usage
ABrain7710 Apr 6, 2024
9a62832
Update value task with new db stuff
ABrain7710 Apr 6, 2024
d982c44
Update repofetch to use new method
ABrain7710 Apr 6, 2024
ee833a1
Facade db improvements
ABrain7710 Apr 6, 2024
7f35800
Imporve database handling in ml workers
ABrain7710 Apr 6, 2024
e5b001c
Remove github key handling dependence from a session
ABrain7710 Apr 7, 2024
6c8d590
Remove git repo clean up
ABrain7710 Apr 9, 2024
2ff53b1
Decouple gitlab api key handler from session
ABrain7710 Apr 9, 2024
62ac0be
Fix issues in branch
ABrain7710 Apr 9, 2024
3959056
Merge branch 'dev' into database-improvements
ABrain7710 Apr 13, 2024
effdd41
Start reducing query usage in github tasks
ABrain7710 Apr 13, 2024
78368a5
Continue improving database handling in github tasks
ABrain7710 Apr 13, 2024
93d5a29
Simplify facade github logic
ABrain7710 Apr 13, 2024
7a3a50d
Reduce dependence on task manifest db
ABrain7710 Apr 13, 2024
9406688
Remove references to execute_sql and insert_data
ABrain7710 Apr 13, 2024
c5687e7
Remove references of session.logger
ABrain7710 Apr 13, 2024
7683067
Reduce usage of GithubTaskManifest where only key auth is needed
ABrain7710 Apr 13, 2024
3e8a6e5
Use get_repo_by_repo_git in gitlab tasks
ABrain7710 Apr 13, 2024
7196b78
Database improvements
ABrain7710 Apr 13, 2024
d02c440
get good changes
ABrain7710 Apr 13, 2024
8a32e62
Merge remote-tracking branch 'origin/database-improvements-2' into da…
ABrain7710 Apr 13, 2024
4d0baaa
Fix circular import
ABrain7710 Apr 13, 2024
6df1bbf
Reduce use of github task manifest
ABrain7710 Apr 15, 2024
4f50ffa
Reduce use of GithubTaskManifest
ABrain7710 Apr 15, 2024
674a5a7
Reduce usage of github task manifest
ABrain7710 Apr 16, 2024
8e29c8e
Continue decoupling code from github task manifest
ABrain7710 Apr 16, 2024
cce031d
Remove more references to session in domain
ABrain7710 Apr 27, 2024
25b6adc
Remove more database
ABrain7710 Apr 27, 2024
2153305
Remove references to github task manifest
ABrain7710 Apr 27, 2024
8878959
Continue reducing instances of DatabaseSession
ABrain7710 Apr 27, 2024
59d5ee4
Remove GitlabTaskManifest
ABrain7710 Apr 27, 2024
a3a5406
Fix some syntax errors and comments
ABrain7710 Apr 27, 2024
1495ef2
Fix multiprocessing issue
ABrain7710 Apr 28, 2024
33e639c
Attempt to clarify profile page terminology, fix redirects
Ulincsys May 6, 2024
69f0d82
Merge pull request #2783 from chaoss/profile-page-fixes
sgoggins May 6, 2024
7a24ffc
Merge branch 'main' into database-improvements
ABrain7710 May 6, 2024
f2f7b87
Merge branch 'dev' into database-improvements
ABrain7710 May 6, 2024
566f910
Handle ratelimit based on github docs
ABrain7710 May 6, 2024
49a717b
Reorder ifs based on docs
ABrain7710 May 6, 2024
c588411
Add log so we can find response that are handled by string interrogation
ABrain7710 May 6, 2024
2d24ccb
Handle 404 status code
ABrain7710 May 6, 2024
49e46cb
Fix linter suggestions
ABrain7710 May 6, 2024
89ca2d6
Merge pull request #2784 from chaoss/handle-github-responses
sgoggins May 8, 2024
9240e51
screipt'
sgoggins May 8, 2024
88b1b7e
update to materialized view on recent actions
sgoggins May 8, 2024
c4facfd
updated materialized view for explorer_contributor_recent_actions
sgoggins May 8, 2024
f2653dd
added performance enhancing indices to new materialized views
sgoggins May 8, 2024
d256667
updated sQL for materialized view
sgoggins May 9, 2024
cea4504
Add default arg values for rabbitmq dockerfile
Ulincsys May 14, 2024
dd05af9
Merge pull request #2791 from chaoss/rabbit-mq-docker-fix
sgoggins May 14, 2024
511593b
Fix syntax error
ABrain7710 May 15, 2024
064a917
Merge pull request #2790 from chaoss/pr-file-patch
ABrain7710 May 21, 2024
4774fda
Add more detail to 500 page report
Ulincsys May 20, 2024
ca489d5
Merge pull request #2802 from chaoss/improve-500-report
IsaacMilarky May 21, 2024
2c8e856
checking pr file errors with more logging
sgoggins May 24, 2024
04b9987
more debugging of pr files
sgoggins May 24, 2024
8ad033f
update
sgoggins May 24, 2024
d66bf45
debugging files
sgoggins May 24, 2024
72b28a7
resorting to traceback
sgoggins May 24, 2024
e13776c
fixing error
sgoggins May 24, 2024
023477f
logging removeal
sgoggins May 29, 2024
12631f6
Merge branch 'dev' into database-improvements
ABrain7710 Jun 3, 2024
7ec8c35
Merge pull request #2809 from chaoss/database-improvements
sgoggins Jun 3, 2024
3de5ba9
use correct get active repo count
ABrain7710 Jun 3, 2024
0c5d734
Pass correct thign
ABrain7710 Jun 3, 2024
2979091
Fix
ABrain7710 Jun 4, 2024
f8217ed
Pass DatabaseSession
ABrain7710 Jun 4, 2024
fc686e5
fixing scorecard
sgoggins Jun 4, 2024
7b914d7
fixing augur startup issue
sgoggins Jun 4, 2024
e2217e5
updated for facade repo out of sync error
sgoggins Jun 4, 2024
c2ee07c
fixing dependency logic issue
sgoggins Jun 4, 2024
c3f4eaa
node dependency checker
sgoggins Jun 4, 2024
90b149c
version update
sgoggins Jun 4, 2024
30b325d
update
sgoggins Jun 4, 2024
0f00cde
fixing
sgoggins Jun 4, 2024
e7d305d
fixing open ssf score card
sgoggins Jun 4, 2024
2d945ca
possibly fixed PR worker task
sgoggins Jun 4, 2024
84b7fea
fixing missing task manifest info
sgoggins Jun 4, 2024
f3002c1
fixing random key auth
sgoggins Jun 4, 2024
6b2667a
can you overload __init__ in Python?
sgoggins Jun 4, 2024
082d5d2
updating things
sgoggins Jun 4, 2024
6d25bd9
trying a hack
sgoggins Jun 4, 2024
85e7b2d
hacking
sgoggins Jun 4, 2024
da9952b
update
sgoggins Jun 4, 2024
e69f65a
added Repo object
sgoggins Jun 4, 2024
bf04ebc
messages fix
sgoggins Jun 4, 2024
d8ccbba
Merge remote-tracking branch 'origin/pr-file-patch' into dev-fixes
sgoggins Jun 4, 2024
18ef774
update session
sgoggins Jun 5, 2024
ad1bc2d
update for colelctionstatus
sgoggins Jun 5, 2024
22312a7
fixing pr files
sgoggins Jun 5, 2024
2c4341d
files model
sgoggins Jun 5, 2024
8a97792
pr fix
sgoggins Jun 5, 2024
b6adf94
update to message collection
sgoggins Jun 5, 2024
7989c12
we never get clones data so I commented it out. You need an API key …
sgoggins Jun 5, 2024
33890da
Updating version
sgoggins Jun 5, 2024
ed6f5e1
updated Dockerfile version info
sgoggins Jun 5, 2024
7cb9d97
dependencies fix
sgoggins Jun 5, 2024
744bcf5
increaing db sleep due to errors like /home/sean/github/rh-k12/augur/…
sgoggins Jun 5, 2024
6e5618d
Merge pull request #2810 from chaoss/dev-fixes
sgoggins Jun 7, 2024
b2e9ea6
fixing this issue: /home/sean/github/virtualenv/hosted/lib/python3.11…
sgoggins Jun 7, 2024
c4811c1
fixing logger
sgoggins Jun 7, 2024
99bea72
optimizing more secondary collection because its falling behind while…
sgoggins Jun 7, 2024
7551451
typo
sgoggins Jun 7, 2024
45ae77d
updating secondary ceiling
sgoggins Jun 7, 2024
7250851
debugging frontend.py repo additions
sgoggins Jun 7, 2024
63a1fcc
optimizing secondary collection
sgoggins Jun 7, 2024
81204db
secondary collection optimization
sgoggins Jun 7, 2024
b342b73
adding logging to validate key rotation
sgoggins Jun 8, 2024
3e1e9b2
core data on 106k repos is staying quite current. Within a week. Seco…
Jun 9, 2024
8c49085
Fix typos and parameter passing issue
ABrain7710 Jun 9, 2024
0bea286
files issues for pr
sgoggins Jun 10, 2024
076cf2e
updating
sgoggins Jun 10, 2024
ebf45a8
files
sgoggins Jun 10, 2024
c2b5690
fixing typo
sgoggins Jun 10, 2024
592461b
update
sgoggins Jun 10, 2024
34a4f66
Merge pull request #2816 from chaoss/xray
sgoggins Jun 10, 2024
4e0ddcc
Merge pull request #2814 from chaoss/dev-pr-patches
sgoggins Jun 10, 2024
1b3a206
npm dependency patch
sgoggins Jun 10, 2024
ec00cd5
Merge pull request #2817 from chaoss/xray
sgoggins Jun 10, 2024
ceb2983
Adding check for null response in PR Review text
sgoggins Jun 10, 2024
bb0b8ed
fixed nul characters in PR reviews
sgoggins Jun 10, 2024
b1560c7
fixing nulls in PR Reviews
sgoggins Jun 10, 2024
a7d5a27
Merge pull request #2818 from chaoss/xdev
sgoggins Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Augur NEW Release v0.70.0
# Augur NEW Release v0.71.0

Augur is primarily a data engineering tool that makes it possible for data scientists to gather open source software community data. Less data carpentry for everyone else!
The primary way of looking at Augur data is through [8Knot](https://github.com/oss-aspen/8knot) ... A public instance of 8Knot is available at https://metrix.chaoss.io ... That is tied to a public instance of Augur at https://ai.chaoss.io
Expand All @@ -10,7 +10,7 @@ The primary way of looking at Augur data is through [8Knot](https://github.com/o
## NEW RELEASE ALERT!
### [If you want to jump right in, updated docker build/compose and bare metal installation instructions are available here](docs/new-install.md)

Augur is now releasing a dramatically improved new version to the main branch. It is also available here: https://github.com/chaoss/augur/releases/tag/v0.70.0
Augur is now releasing a dramatically improved new version to the main branch. It is also available here: https://github.com/chaoss/augur/releases/tag/v0.71.0

- The `main` branch is a stable version of our new architecture, which features:
- Dramatic improvement in the speed of large scale data collection (100,000+ repos). All data is obtained for 100k+ repos within 2 weeks.
Expand Down
3 changes: 2 additions & 1 deletion augur/api/routes/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# Disable the requirement for SSL by setting env["AUGUR_DEV"] = True
from augur.application.config import get_development_flag
from augur.application.db.lib import get_session
from augur.application.db.models import Config
from augur.application.config import AugurConfig
from augur.application.db.session import DatabaseSession
Expand Down Expand Up @@ -45,7 +46,7 @@ def update_config():

update_dict = request.get_json()

with DatabaseSession(logger, engine=current_app.engine) as session:
with get_session() as session:

for section, data in update_dict.items():

Expand Down
2 changes: 1 addition & 1 deletion augur/api/routes/dei.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def core_task_success_util_gen(repo_git):
deiHook = CollectionRequest("core",primary_enabled_phases)
deiHook.repo_list = [repo_url]

singleRoutine = AugurTaskRoutine(session,[deiHook])
singleRoutine = AugurTaskRoutine(logger, session,[deiHook])
singleRoutine.start_data_collection()
#start_block_of_repos(logger, session, [repo_url], primary_enabled_phases, "new")

Expand Down
1 change: 1 addition & 0 deletions augur/api/view/augur_view.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
from flask import render_template, redirect, url_for, session, request, jsonify

Check warning on line 1 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 C0114: Missing module docstring (missing-module-docstring) Raw Output: augur/api/view/augur_view.py:1:0: C0114: Missing module docstring (missing-module-docstring)
from flask_login import LoginManager
from io import StringIO
from .utils import *

Check warning on line 4 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0402: Attempted relative import beyond top-level package (relative-beyond-top-level) Raw Output: augur/api/view/augur_view.py:4:0: E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)

Check warning on line 4 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0401: Wildcard import utils (wildcard-import) Raw Output: augur/api/view/augur_view.py:4:0: W0401: Wildcard import utils (wildcard-import)
from .init import logger

Check warning on line 5 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0402: Attempted relative import beyond top-level package (relative-beyond-top-level) Raw Output: augur/api/view/augur_view.py:5:0: E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
from .url_converters import *

Check warning on line 6 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0402: Attempted relative import beyond top-level package (relative-beyond-top-level) Raw Output: augur/api/view/augur_view.py:6:0: E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)

Check warning on line 6 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0401: Wildcard import url_converters (wildcard-import) Raw Output: augur/api/view/augur_view.py:6:0: W0401: Wildcard import url_converters (wildcard-import)

# from .server import User
from ..server import app, db_session

Check warning on line 9 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0402: Attempted relative import beyond top-level package (relative-beyond-top-level) Raw Output: augur/api/view/augur_view.py:9:0: E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
from augur.application.db.models import User, UserSessionToken
from augur.api.routes import AUGUR_API_VERSION
from augur.api.util import get_bearer_token

import time, traceback

Check warning on line 14 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 C0410: Multiple imports on one line (time, traceback) (multiple-imports) Raw Output: augur/api/view/augur_view.py:14:0: C0410: Multiple imports on one line (time, traceback) (multiple-imports)

login_manager = LoginManager()

login_manager.init_app(app)

app.secret_key = getSetting("session_key")

Check warning on line 20 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0602: Undefined variable 'getSetting' (undefined-variable) Raw Output: augur/api/view/augur_view.py:20:17: E0602: Undefined variable 'getSetting' (undefined-variable)

app.url_map.converters['list'] = ListConverter

Check warning on line 22 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0602: Undefined variable 'ListConverter' (undefined-variable) Raw Output: augur/api/view/augur_view.py:22:33: E0602: Undefined variable 'ListConverter' (undefined-variable)
app.url_map.converters['bool'] = BoolConverter
app.url_map.converters['json'] = JSONConverter

Expand Down Expand Up @@ -48,6 +48,7 @@
traceback.print_tb(error.__traceback__, file=errout)
# traceback.print_exception(error, file=errout)
stacktrace = errout.getvalue()
stacktrace += f"\n{type(error).__name__}: {str(error)}"
errout.close()
except Exception as e:
logger.error(e)
Expand Down
9 changes: 5 additions & 4 deletions augur/application/cli/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def start(ctx, disable_collection, development, port):
create_collection_status_records.si().apply_async()
time.sleep(3)

#put contributor breadth back in. Not sure why it was commented out
contributor_breadth_model.si().apply_async()

# start cloning repos when augur starts
Expand Down Expand Up @@ -164,15 +165,15 @@ def determine_worker_processes(ratio,maximum):
process_list.append(subprocess.Popen(scheduling_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

sleep_time += 6

#60% of estimate, Maximum value of 45
core_num_processes = determine_worker_processes(.6, 45)
#60% of estimate, Maximum value of 45 : Reduced because it can be lower
core_num_processes = determine_worker_processes(.15, 10)
logger.info(f"Starting core worker processes with concurrency={core_num_processes}")
core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={core_num_processes} -n core:{uuid.uuid4().hex}@%h"
process_list.append(subprocess.Popen(core_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

sleep_time += 6

#20% of estimate, Maximum value of 25
secondary_num_processes = determine_worker_processes(.25, 45)
secondary_num_processes = determine_worker_processes(.70, 60)
logger.info(f"Starting secondary worker processes with concurrency={secondary_num_processes}")
secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={secondary_num_processes} -n secondary:{uuid.uuid4().hex}@%h -Q secondary"
process_list.append(subprocess.Popen(secondary_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

Expand Down Expand Up @@ -317,7 +318,7 @@ def assign_orphan_repos_to_default_user(session):
repos = session.execute_sql(query).fetchall()

for repo in repos:
UserRepo.insert(session,repo[0],1)
UserRepo.insert(session, repo[0],1)


@cli.command('export-env')
Expand Down
8 changes: 4 additions & 4 deletions augur/application/cli/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ def determine_worker_processes(ratio,maximum):
process_list.append(subprocess.Popen(scheduling_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

sleep_time += 6

#60% of estimate, Maximum value of 45
core_num_processes = determine_worker_processes(.6, 45)
#60% of estimate, Maximum value of 45: Reduced because not needed
core_num_processes = determine_worker_processes(.15, 10)
logger.info(f"Starting core worker processes with concurrency={core_num_processes}")
core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={core_num_processes} -n core:{uuid.uuid4().hex}@%h"
process_list.append(subprocess.Popen(core_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

sleep_time += 6

#20% of estimate, Maximum value of 25
secondary_num_processes = determine_worker_processes(.25, 45)
secondary_num_processes = determine_worker_processes(.70, 60)
logger.info(f"Starting secondary worker processes with concurrency={secondary_num_processes}")
secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={secondary_num_processes} -n secondary:{uuid.uuid4().hex}@%h -Q secondary"
process_list.append(subprocess.Popen(secondary_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

Expand Down Expand Up @@ -301,4 +301,4 @@ def assign_orphan_repos_to_default_user(session):
repos = session.execute_sql(query).fetchall()

for repo in repos:
UserRepo.insert(session,repo[0],1)
UserRepo.insert(session, repo[0],1)
4 changes: 2 additions & 2 deletions augur/application/cli/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def start():
secondary_worker_process = None

scheduling_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=1 -n scheduling:{uuid.uuid4().hex}@%h -Q scheduling"
core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=45 -n core:{uuid.uuid4().hex}@%h"
secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=45 -n secondary:{uuid.uuid4().hex}@%h -Q secondary"
core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=20 -n core:{uuid.uuid4().hex}@%h"
secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=60 -n secondary:{uuid.uuid4().hex}@%h -Q secondary"

scheduling_worker_process = subprocess.Popen(scheduling_worker.split(" "))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

core_worker_process = subprocess.Popen(core_worker.split(" "))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

Expand Down
1 change: 1 addition & 0 deletions augur/application/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def add_or_update_settings(self, settings: List[dict]):
query = self.session.query(Config).filter(and_(Config.section_name == setting["section_name"],Config.setting_name == setting["setting_name"]) )

if execute_session_query(query, 'first') is None:
# TODO: Update to use bulk insert dicts so config doesn't require database session
sgoggins marked this conversation as resolved.
Show resolved Hide resolved
self.session.insert_data(setting,Config, ["section_name", "setting_name"])
else:
#If setting exists. use raw update to not increase autoincrement
Expand Down
Loading
Loading