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

A bandaid, for now #87

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading