bullishpy 0.43.0__py3-none-any.whl → 0.45.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bullish/jobs/tasks.py +18 -14
- bullish/utils/checks.py +3 -0
- {bullishpy-0.43.0.dist-info → bullishpy-0.45.0.dist-info}/METADATA +1 -1
- {bullishpy-0.43.0.dist-info → bullishpy-0.45.0.dist-info}/RECORD +6 -6
- {bullishpy-0.43.0.dist-info → bullishpy-0.45.0.dist-info}/WHEEL +0 -0
- {bullishpy-0.43.0.dist-info → bullishpy-0.45.0.dist-info}/entry_points.txt +0 -0
bullish/jobs/tasks.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import functools
|
|
2
2
|
import logging
|
|
3
|
+
import random
|
|
3
4
|
from typing import Optional, Any, Callable, List
|
|
4
5
|
|
|
5
6
|
from bearish.main import Bearish # type: ignore
|
|
@@ -14,7 +15,7 @@ from .models import JobTrackerStatus, JobTracker, JobType
|
|
|
14
15
|
from ..analysis.analysis import run_analysis, run_signal_series_analysis
|
|
15
16
|
from ..analysis.backtest import run_many_tests, BackTestConfig
|
|
16
17
|
from ..analysis.industry_views import compute_industry_view
|
|
17
|
-
from ..analysis.predefined_filters import predefined_filters
|
|
18
|
+
from ..analysis.predefined_filters import predefined_filters
|
|
18
19
|
from ..database.crud import BullishDb
|
|
19
20
|
from bullish.analysis.filter import FilterUpdate
|
|
20
21
|
from ..utils.checks import DataBaseSingleTon
|
|
@@ -91,9 +92,10 @@ def cron_update(
|
|
|
91
92
|
task: Optional[Task] = None,
|
|
92
93
|
) -> None:
|
|
93
94
|
database = DataBaseSingleTon()
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
if database.valid():
|
|
96
|
+
job_tracker(_base_update)(
|
|
97
|
+
database.path, "Update data", [], FilterUpdate(), task=task
|
|
98
|
+
)
|
|
97
99
|
|
|
98
100
|
|
|
99
101
|
@huey.task(context=True) # type: ignore
|
|
@@ -155,14 +157,16 @@ def news(
|
|
|
155
157
|
def cron_news(
|
|
156
158
|
task: Optional[Task] = None,
|
|
157
159
|
) -> None:
|
|
158
|
-
|
|
160
|
+
filter = random.choice(predefined_filters()) # noqa: S311
|
|
159
161
|
database = DataBaseSingleTon()
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
162
|
+
if database.valid():
|
|
163
|
+
bullish_db = BullishDb(database_path=database.path)
|
|
164
|
+
data = bullish_db.read_filter_query(filter)
|
|
165
|
+
if not data.empty and "symbol" in data.columns:
|
|
166
|
+
job_tracker(base_news)(
|
|
167
|
+
database_path=database.path,
|
|
168
|
+
job_type="Fetching news",
|
|
169
|
+
symbols=data["symbol"].unique().tolist(),
|
|
170
|
+
headless=False,
|
|
171
|
+
task=task,
|
|
172
|
+
)
|
bullish/utils/checks.py
CHANGED
|
@@ -51,10 +51,10 @@ bullish/interface/interface.py,sha256=R2qVEMyBl9mBlPUO40zXp4vhfLKH7pgl_u2BmAVlD4
|
|
|
51
51
|
bullish/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
52
|
bullish/jobs/app.py,sha256=5MJ5KXUo7JSNAvOPgkpIMasD11VTrjQvGzM7vmCY65E,77
|
|
53
53
|
bullish/jobs/models.py,sha256=S2yvBf69lmt4U-5OU5CjXCMSw0s9Ubh9xkrB3k2qOZo,764
|
|
54
|
-
bullish/jobs/tasks.py,sha256=
|
|
54
|
+
bullish/jobs/tasks.py,sha256=XO8Pa6MoYeJQ4uvD3OYStEOh7l5zTK7hUFKvZksvpOM,5346
|
|
55
55
|
bullish/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
|
-
bullish/utils/checks.py,sha256=
|
|
57
|
-
bullishpy-0.
|
|
58
|
-
bullishpy-0.
|
|
59
|
-
bullishpy-0.
|
|
60
|
-
bullishpy-0.
|
|
56
|
+
bullish/utils/checks.py,sha256=jolHOnxkc5GvVuvVzlwHhM6EO-Y-eC0q3rXlHE-UG9Y,2633
|
|
57
|
+
bullishpy-0.45.0.dist-info/METADATA,sha256=6snNwR53hVtt4_8QYdRGaTSWwjk63Rnr5rwiJJhoBf4,830
|
|
58
|
+
bullishpy-0.45.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
59
|
+
bullishpy-0.45.0.dist-info/entry_points.txt,sha256=eaPpmL6vmSBFo0FBtwibCXGqAW4LFJ83whJzT1VjD-0,43
|
|
60
|
+
bullishpy-0.45.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|