Skip to content

Commit

Permalink
Merge pull request #87 from akrherz/bloat
Browse files Browse the repository at this point in the history
A bandaid, for now
  • Loading branch information
akrherz authored Sep 26, 2024
2 parents f848b60 + 2a5f6c1 commit accf26a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.1"
rev: "v0.6.8"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
3 changes: 2 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

# third party
import pytest
from iembot.basicbot import basicbot
from pyiem.database import get_dbconnc

from iembot.basicbot import basicbot


@pytest.fixture()
def bot():
Expand Down
8 changes: 5 additions & 3 deletions iembot.tac
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Base Python
import json

# Local Import
from iembot import iemchatbot, webservices
from psycopg.rows import dict_row

# Twisted Bits
Expand All @@ -14,6 +12,9 @@ from twisted.internet import reactor
from twisted.web import server
from txyam.client import YamClient

# Local Import
from iembot import iemchatbot, webservices

with open("settings.json", encoding="utf-8") as fh:
dbconfig = json.load(fh)

Expand Down Expand Up @@ -58,4 +59,5 @@ r.setServiceParent(serviceCollection)

# Increase threadpool size to do more work at once
# 128 not large enough when SPC's products come through :/
reactor.getThreadPool().adjustPoolsize(maxthreads=256)
# 256 is not enough for hurricanes
reactor.getThreadPool().adjustPoolsize(maxthreads=512)
10 changes: 5 additions & 5 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
import tempfile
from unittest import mock

# local
import iembot.util as botutil

# Third party modules
import pytest
from iembot.basicbot import basicbot
from iembot.iemchatbot import JabberClient
from twisted.python.failure import Failure
from twisted.words.xish.domish import Element
from twitter.error import TwitterError

# local
import iembot.util as botutil
from iembot.basicbot import basicbot
from iembot.iemchatbot import JabberClient


@pytest.mark.parametrize("database", ["mesosite"])
def test_load_mastodon_from_db(dbcursor):
Expand Down
1 change: 1 addition & 0 deletions tests/test_util_channels.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test things done with channel subs."""

import pytest

from iembot.util import (
channels_room_add,
channels_room_del,
Expand Down

0 comments on commit accf26a

Please sign in to comment.