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

use rq worker pool #566

Merged
merged 3 commits into from
Jul 16, 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
6 changes: 4 additions & 2 deletions catalog/jobs/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ def get_popular_commented_podcast_ids(self, days, exisiting_ids):
def cleanup_shows(self, items):
seasons = [i for i in items if i.__class__ == TVSeason]
for season in seasons:
if season.show in items:
items.remove(season.show)
if season.show:
items.remove(season)
if season.show not in items:
items.append(season.show)
return items

def run(self):
Expand Down
2 changes: 1 addition & 1 deletion catalog/podcast/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Podcast(Item):
# "brief",
"localized_title",
"language",
"hosts",
"host",
"genre",
"official_site",
"localized_description",
Expand Down
2 changes: 1 addition & 1 deletion catalog/podcast/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def test_scrape_typlog(self):
# metadata = site.resource.metadata
# self.assertEqual(metadata["title"], "大内密谈")
# self.assertEqual(metadata["genre"], ["other"])
# self.assertEqual(metadata["hosts"], ["大内密谈"])
# self.assertEqual(metadata["host"], ["大内密谈"])
# self.assertIsNotNone(site.get_item().recent_episodes[0].title)
# self.assertIsNotNone(site.get_item().recent_episodes[0].link)
# self.assertIsNotNone(site.get_item().recent_episodes[0].media_url)
2 changes: 1 addition & 1 deletion catalog/templates/album.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% load duration %}
<!-- class specific details -->
{% block details %}
<div>{% include '_people.html' with people=item.additional_title role='other title' max=5 %}</div>
<div>{% include '_people.html' with people=item.additional_title role='' max=99 %}</div>
<div>{% include '_people.html' with people=item.artist role='artist' max=5 %}</div>
<div>{% include '_people.html' with people=item.company role='publisher' max=5 %}</div>
<div>
Expand Down
2 changes: 1 addition & 1 deletion catalog/templates/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- class specific details -->
{% block details %}
<div class="tldr-2" _="on click toggle .tldr-2 on me">
{% include '_people.html' with people=item.additional_title _role='other title' max=99 %}
{% include '_people.html' with people=item.additional_title _role='' max=99 %}
</div>
<div>
{% if item.release_date %}
Expand Down
2 changes: 1 addition & 1 deletion catalog/templates/movie.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% load thumb %}
<!-- class specific details -->
{% block details %}
<div>{% include '_people.html' with people=item.additional_title role='other title' max=5 %}</div>
<div>{% include '_people.html' with people=item.additional_title role='' max=99 %}</div>
<div>{% include '_people.html' with people=item.director role='director' max=5 %}</div>
<div>{% include '_people.html' with people=item.playwright role='playwright' max=5 %}</div>
<div>{% include '_people.html' with people=item.actor role='actor' max=5 %}</div>
Expand Down
2 changes: 1 addition & 1 deletion catalog/templates/performance.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% load thumb %}
<!-- class specific details -->
{% block details %}
<div>{% include '_people.html' with people=item.additional_title _role='other title' max=5 %}</div>
<div>{% include '_people.html' with people=item.additional_title _role='' max=99 %}</div>
<div>
{% if item.opening_date %}
{% trans "opening date" %}:
Expand Down
2 changes: 1 addition & 1 deletion catalog/templates/performanceproduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% if item.closing_date %}~ <span>{{ item.closing_date }}</span>{% endif %}
{% endif %}
</div>
<div>{% include '_people.html' with people=item.additional_title _role='other title' max=5 %}</div>
<div>{% include '_people.html' with people=item.additional_title _role='' max=99 %}</div>
<div>{% include '_people.html' with people=item.genre role='genre' max=5 %}</div>
<div>{% include '_people.html' with people=item.troupe role='troupe' max=5 %}</div>
<div>{% include '_people.html' with people=item.location role='theater' max=5 %}</div>
Expand Down
2 changes: 1 addition & 1 deletion catalog/templates/tvshow.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% load thumb %}
<!-- class specific details -->
{% block details %}
<div>{% include '_people.html' with people=item.additional_title role='other title' max=5 %}</div>
<div>{% include '_people.html' with people=item.additional_title role='' max=99 %}</div>
<div>{% include '_people.html' with people=item.director role='director' max=5 %}</div>
<div>{% include '_people.html' with people=item.playwright role='playwright' max=5 %}</div>
<div>{% include '_people.html' with people=item.actor role='actor' max=5 %}</div>
Expand Down
2 changes: 1 addition & 1 deletion catalog/templates/work.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% load thumb %}
<!-- class specific details -->
{% block details %}
<div>{% include '_people.html' with people=item.additional_title role='other title' max=5 %}</div>
<div>{% include '_people.html' with people=item.additional_title role='' max=99 %}</div>
<div>{% include '_people.html' with people=item.author role='author' max=5 %}</div>
{% endblock %}
{% block left_sidebar %}
Expand Down
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ services:

neodb-worker:
<<: *neodb-service
command: neodb-manage rqworker --with-scheduler import export mastodon fetch crawl ap cron
command: neodb-manage rqworker-pool --num-workers ${NEODB_RQ_WORKER_NUM:-4} --with-scheduler import export mastodon fetch crawl ap cron
depends_on:
migration:
condition: service_completed_successfully
Expand Down
Loading