udata 14.0.1.dev4__py3-none-any.whl → 14.0.2.dev1__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.
- udata/harvest/actions.py +1 -1
- udata/harvest/tests/test_actions.py +12 -3
- {udata-14.0.1.dev4.dist-info → udata-14.0.2.dev1.dist-info}/METADATA +1 -1
- {udata-14.0.1.dev4.dist-info → udata-14.0.2.dev1.dist-info}/RECORD +8 -8
- {udata-14.0.1.dev4.dist-info → udata-14.0.2.dev1.dist-info}/WHEEL +0 -0
- {udata-14.0.1.dev4.dist-info → udata-14.0.2.dev1.dist-info}/entry_points.txt +0 -0
- {udata-14.0.1.dev4.dist-info → udata-14.0.2.dev1.dist-info}/licenses/LICENSE +0 -0
- {udata-14.0.1.dev4.dist-info → udata-14.0.2.dev1.dist-info}/top_level.txt +0 -0
udata/harvest/actions.py
CHANGED
|
@@ -254,7 +254,7 @@ def schedule(
|
|
|
254
254
|
source.modify(
|
|
255
255
|
periodic_task=PeriodicTask.objects.create(
|
|
256
256
|
task="harvest",
|
|
257
|
-
name="Harvest {
|
|
257
|
+
name=f"Harvest {source.name} ({source.id})",
|
|
258
258
|
description="Periodic Harvesting",
|
|
259
259
|
enabled=True,
|
|
260
260
|
args=[str(source.id)],
|
|
@@ -271,7 +271,16 @@ class HarvestActionsTest(MockBackendsMixin, PytestOnlyDBTestCase):
|
|
|
271
271
|
assert periodic_task.crontab.day_of_month == "*"
|
|
272
272
|
assert periodic_task.crontab.month_of_year == "*"
|
|
273
273
|
assert periodic_task.enabled
|
|
274
|
-
assert periodic_task.name == "Harvest {
|
|
274
|
+
assert periodic_task.name == f"Harvest {source.name} ({source.id})"
|
|
275
|
+
|
|
276
|
+
def test_double_schedule_with_same_name(self):
|
|
277
|
+
source_1 = HarvestSourceFactory(name="A")
|
|
278
|
+
source_2 = HarvestSourceFactory(name="A")
|
|
279
|
+
|
|
280
|
+
actions.schedule(source_1, hour=0)
|
|
281
|
+
actions.schedule(source_2, hour=0)
|
|
282
|
+
|
|
283
|
+
assert len(PeriodicTask.objects) == 2
|
|
275
284
|
|
|
276
285
|
def test_schedule_from_cron(self):
|
|
277
286
|
source = HarvestSourceFactory()
|
|
@@ -288,7 +297,7 @@ class HarvestActionsTest(MockBackendsMixin, PytestOnlyDBTestCase):
|
|
|
288
297
|
assert periodic_task.crontab.month_of_year == "3"
|
|
289
298
|
assert periodic_task.crontab.day_of_week == "sunday"
|
|
290
299
|
assert periodic_task.enabled
|
|
291
|
-
assert periodic_task.name == "Harvest {
|
|
300
|
+
assert periodic_task.name == f"Harvest {source.name} ({source.id})"
|
|
292
301
|
|
|
293
302
|
def test_reschedule(self):
|
|
294
303
|
source = HarvestSourceFactory()
|
|
@@ -308,7 +317,7 @@ class HarvestActionsTest(MockBackendsMixin, PytestOnlyDBTestCase):
|
|
|
308
317
|
assert periodic_task.crontab.day_of_month == "*"
|
|
309
318
|
assert periodic_task.crontab.month_of_year == "*"
|
|
310
319
|
assert periodic_task.enabled
|
|
311
|
-
assert periodic_task.name == "Harvest {
|
|
320
|
+
assert periodic_task.name == f"Harvest {source.name} ({source.id})"
|
|
312
321
|
|
|
313
322
|
def test_unschedule(self):
|
|
314
323
|
periodic_task = PeriodicTask.objects.create(
|
|
@@ -298,7 +298,7 @@ udata/forms/widgets.py,sha256=7qymIpynrQmNlA8hrkcF0RB8eLwOJFkjca_KOZ0zqtE,1332
|
|
|
298
298
|
udata/frontend/__init__.py,sha256=EzIwb8cQ1z4ItMAQO9EM9NOeKpOt7aXEHbbBCLnQQ2M,264
|
|
299
299
|
udata/frontend/markdown.py,sha256=5kNMVOMLlGvJfpIVONaQv4JT1pi6qWNcnb_BVV_VNJQ,4324
|
|
300
300
|
udata/harvest/__init__.py,sha256=C4y5w4vGb_F9Opy62lzV3eHo4DkNyRgPCq-wsarPXiQ,28
|
|
301
|
-
udata/harvest/actions.py,sha256=
|
|
301
|
+
udata/harvest/actions.py,sha256=FtUua5eF00_wC7uR1FJ7N1twvKQZIWqwmKJ4bh1UQnc,9603
|
|
302
302
|
udata/harvest/api.py,sha256=807CONm74QHECHcywNxsp_dFh8jOkJU9p9cTtdgJGuE,16525
|
|
303
303
|
udata/harvest/commands.py,sha256=tGbGTygiEQ9UFQo3zfnNf7rtPaOZLrIYpmXkSQUAmAQ,5077
|
|
304
304
|
udata/harvest/csv.py,sha256=TcHWJLiEbK8ouwGGYZy9US4nMxfWk1Ydw8sMlPit1tk,392
|
|
@@ -322,7 +322,7 @@ udata/harvest/backends/ckan/schemas/dkan.py,sha256=RyQGPEaKqnunIrr9yApcz7WEfgye0
|
|
|
322
322
|
udata/harvest/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
323
323
|
udata/harvest/tests/factories.py,sha256=_V_RICVo33rhnZd5Kk7eZrxuIYHSBi8iWWGHFMLUdhU,2292
|
|
324
324
|
udata/harvest/tests/person.jsonld,sha256=I7Ynh-PQlNeD51I1LrCgYOEjhL-WBeb65xzIE_sHuAA,3230
|
|
325
|
-
udata/harvest/tests/test_actions.py,sha256=
|
|
325
|
+
udata/harvest/tests/test_actions.py,sha256=Z5b1XwTMp34FuJhUe3LUksKZg1GvCf744OlNyI5jo7I,26459
|
|
326
326
|
udata/harvest/tests/test_api.py,sha256=2MCQBuebMFCzMG7_E7cIqmHIdZJPd6bkiYwqrjYQ_aY,21469
|
|
327
327
|
udata/harvest/tests/test_base_backend.py,sha256=yvAxO5XFnEpibVi9gUYbqhwdMupJbuwjfajwGqC19OA,19312
|
|
328
328
|
udata/harvest/tests/test_dcat_backend.py,sha256=TOMT9aXbDPT_RVVhKgaa3Kw2ndhSDuIpZWQhNPQmN3Q,53753
|
|
@@ -577,9 +577,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=u5JAz24MHYW96FFn_h7lZejdNLc3N5
|
|
|
577
577
|
udata/translations/pt/LC_MESSAGES/udata.po,sha256=KflmyEYuCeT9ZzQ2NEy3VtgI1CUUwV4z7xESewVMnCs,46371
|
|
578
578
|
udata/translations/sr/LC_MESSAGES/udata.mo,sha256=lbVQpVrSh-0xSUOhSyd-ADdhuNH9nd6Eo_T-zk-4Vrk,20441
|
|
579
579
|
udata/translations/sr/LC_MESSAGES/udata.po,sha256=As8H3QOp3cCd0TgwhHqIH2CRBCFfPoEnbU4dfcBsACM,51344
|
|
580
|
-
udata-14.0.
|
|
581
|
-
udata-14.0.
|
|
582
|
-
udata-14.0.
|
|
583
|
-
udata-14.0.
|
|
584
|
-
udata-14.0.
|
|
585
|
-
udata-14.0.
|
|
580
|
+
udata-14.0.2.dev1.dist-info/licenses/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
|
|
581
|
+
udata-14.0.2.dev1.dist-info/METADATA,sha256=jU6hQhInAFAhIIsUqJVRjQejuY_6MYd4u5QuhhLx7Mg,5085
|
|
582
|
+
udata-14.0.2.dev1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
583
|
+
udata-14.0.2.dev1.dist-info/entry_points.txt,sha256=XwrEzP-n_6CKnwTsrNHzyCTWbMwg2FkvxVVB686f_C0,476
|
|
584
|
+
udata-14.0.2.dev1.dist-info/top_level.txt,sha256=EF6CE6YSHd_og-8LCEA4q25ALUpWVe8D0okOLdMAE3A,6
|
|
585
|
+
udata-14.0.2.dev1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|