From 5975a2d081db4fd6582f829e0df0dd9263ca4e28 Mon Sep 17 00:00:00 2001 From: Islam Asabaev <105982046+7576457@users.noreply.github.com> Date: Sat, 25 Apr 2026 02:06:07 +0300 Subject: [PATCH] feat: add `ru` locale and improve translations (#320) * Add ru locale * fix * fix: remove duplicate * Add field labels and continue ru locale * fix: Add ru gettext for queue columns, short result column, and OrmQ field labels * fix: locale paths in translation files * chore: format code with ruff * chore: format code with ruff * fix: correct time_taken usage in admin Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update django_q/locale/de/LC_MESSAGES/django.po Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update django_q/locale/tr/LC_MESSAGES/django.po Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: clear fuzzy markers --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- django_q/admin.py | 9 + django_q/locale/de/LC_MESSAGES/django.po | 678 ++++++++++------- django_q/locale/fr/LC_MESSAGES/django.po | 498 +++++++++---- django_q/locale/ru/LC_MESSAGES/django.po | 676 +++++++++++++++++ django_q/locale/tr/LC_MESSAGES/django.po | 490 +++++++++---- django_q/locale/zh_Hans/LC_MESSAGES/django.po | 683 +++++++++++------- ...alter_ormq_key_alter_ormq_lock_and_more.py | 325 +++++++++ django_q/models.py | 179 ++++- django_q/monitor.py | 2 +- django_q/utils.py | 4 +- 10 files changed, 2706 insertions(+), 838 deletions(-) create mode 100644 django_q/locale/ru/LC_MESSAGES/django.po create mode 100644 django_q/migrations/0019_alter_task_options_alter_ormq_key_alter_ormq_lock_and_more.py diff --git a/django_q/admin.py b/django_q/admin.py index ccb3f9d..b34aabf 100644 --- a/django_q/admin.py +++ b/django_q/admin.py @@ -2,6 +2,7 @@ from django.contrib import admin from django.db.models.expressions import OuterRef, Subquery +from django.template.defaultfilters import truncatechars from django.urls import reverse from django.utils.html import format_html from django.utils.translation import gettext_lazy as _ @@ -60,6 +61,10 @@ class TaskAdmin(admin.ModelAdmin): """Set all fields readonly.""" return list(self.readonly_fields) + [field.name for field in obj._meta.fields] + @admin.display(description=_("Time Taken")) + def time_taken(self, obj): + return obj.time_taken() + class FailAdmin(admin.ModelAdmin): """model admin for failed tasks.""" @@ -87,6 +92,10 @@ class FailAdmin(admin.ModelAdmin): """Set all fields readonly.""" return list(self.readonly_fields) + [field.name for field in obj._meta.fields] + @admin.display(description=_("Short result")) + def short_result(self, obj): + return truncatechars(obj.result, 100) + class ScheduleAdmin(admin.ModelAdmin): """model admin for schedules""" diff --git a/django_q/locale/de/LC_MESSAGES/django.po b/django_q/locale/de/LC_MESSAGES/django.po index 57c811c..cbe3bf3 100644 --- a/django_q/locale/de/LC_MESSAGES/django.po +++ b/django_q/locale/de/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-26 01:38+0000\n" +"POT-Creation-Date: 2026-04-17 21:10+0000\n" "PO-Revision-Date: 2018-08-05 18:28+0200\n" "Last-Translator: Jonas Winkler\n" "Language-Team: \n" @@ -17,37 +17,45 @@ msgstr "" "X-Generator: Poedit 2.1.1\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: admin.py:43 +#: admin.py:30 msgid "Resubmit selected tasks to queue" msgstr "Ausgewählte Aufgaben erneut ausführen" -#: admin.py:107 models.py:293 +#: admin.py:64 +msgid "Time Taken" +msgstr "" + +#: admin.py:95 +msgid "Short result" +msgstr "" + +#: admin.py:142 models.py:412 #, fuzzy #| msgid "Success" msgid "success" msgstr "erfolg" -#: admin.py:119 models.py:295 +#: admin.py:154 models.py:414 msgid "last_run" msgstr "" -#: cluster.py:79 +#: cluster.py:75 #, python-format msgid "Q Cluster %(name)s starting." msgstr "Q-Cluster %(name)s wird gestartet." -#: cluster.py:87 +#: cluster.py:83 #, fuzzy, python-format #| msgid "Q Cluster-{} stopping." msgid "Q Cluster %(name)s stopping." msgstr "Q-Cluster {name} wird gestoppt." -#: cluster.py:90 +#: cluster.py:86 #, python-format msgid "Q Cluster %(name)s has stopped." msgstr "Q-Cluster %(name)s wurde gestoppt." -#: cluster.py:97 +#: cluster.py:93 #, python-format msgid "%(name)s got signal %(signal)s" msgstr "%(name)s erhielt das Signal %(signal)s" @@ -62,7 +70,7 @@ msgstr "Monitor %(name)s wurde nach unerwartetem Absturz neu gestartet" msgid "reincarnated pusher %(name)s after sudden death" msgstr "Pusher %(name)s wurde nach unerwartetem Absturz neu gestartet" -#: cluster.py:250 +#: cluster.py:262 #, fuzzy, python-format #| msgid "reincarnated worker %(name)s after timeout" msgid "" @@ -70,123 +78,57 @@ msgid "" "%(task_name)s" msgstr "Worker %(name)s wurde nach Zeitüberschreitung neu gestartet" -#: cluster.py:255 +#: cluster.py:265 #, python-format msgid "reincarnated worker %(name)s after timeout" msgstr "Worker %(name)s wurde nach Zeitüberschreitung neu gestartet" -#: cluster.py:260 +#: cluster.py:270 #, python-format msgid "recycled worker %(name)s" msgstr "Worker %(name)s wurde wiederverwendet" -#: cluster.py:263 +#: cluster.py:273 #, python-format msgid "reincarnated worker %(name)s after death" msgstr "Worker %(name)s wurde nach unerwartetem Absturz neu gestartet" -#: cluster.py:287 +#: cluster.py:297 #, python-format msgid "%(name)s guarding cluster %(cluster_name)s" msgstr "%(name)s beschützt das Cluster %(cluster_name)s" -#: cluster.py:296 +#: cluster.py:307 #, python-format msgid "Q Cluster %(cluster_name)s running." msgstr "Q-Cluster %(cluster_name)s läuft." -#: cluster.py:332 +#: cluster.py:346 #, python-format msgid "%(name)s stopping cluster processes" msgstr "%(name)s hält Cluster-Prozesse an" -#: cluster.py:357 +#: cluster.py:371 #, python-format msgid "%(name)s waiting for the monitor." msgstr "%(name)s wartet auf den Monitor." -#: cluster.py:383 -#, fuzzy, python-format -#| msgid "%(process_name)s pushing tasks at %(id)s" -msgid "%(name)s pushing tasks at %(id)s" -msgstr "%(process_name)s veröffentlicht Aufagaben auf %(id)s" - -#: cluster.py:407 -#, python-format -msgid "queueing from %(list_key)s" -msgstr "Einreihen von %(list_key)s" - -#: cluster.py:411 -#, python-format -msgid "%(name)s stopped pushing tasks" -msgstr "%(name)s veröffentlicht keine Aufgaben mehr" - -#: cluster.py:426 -#, python-format -msgid "%(name)s monitoring at %(id)s" -msgstr "%(name)s beobachtet auf %(id)s" - -#: cluster.py:445 -#, python-format -msgid "Processed '%(info_name)s' (%(task_name)s)" -msgstr "[%(task_name)s] - '%(info_name)s' wurde verarbeitet" - -#: cluster.py:451 -#, python-format -msgid "Failed '%(info_name)s' (%(task_name)s) - %(task_result)s" -msgstr "'%(info_name)s' (%(task_name)s) ist fehlgeschlagen - %(task_result)s" - -#: cluster.py:458 -#, python-format -msgid "%(name)s stopped monitoring results" -msgstr "%(name)s überwacht keine Ergebnisse mehr" - -#: cluster.py:474 -#, python-format -msgid "%(proc_name)s ready for work at %(id)s" -msgstr "%(proc_name)s ist bereit für Arbeit auf %(id)s" - -#: cluster.py:494 -#, fuzzy, python-format -#| msgid "%(proc_name)s processing '%(func_name)s' (%(task_name)s)" -msgid "%(proc_name)s processing %(task_name)s '%(func_name)s'" -msgstr "%(proc_name)s verarbeitet '%(func_name)s' (%(task_name)s)" - -#: cluster.py:546 -#, python-format -msgid "%(proc_name)s stopped doing work" -msgstr "%(proc_name)s hat die Arbeit beendet" - -#: cluster.py:751 -#, python-format -msgid "%(process_name)s failed to create a task from schedule [%(schedule)s]" -msgstr "" -"%(process_name)s konnte keine Aufgabe von Zeitplan [%(schedule)s] erstellen" - -#: cluster.py:762 -#, fuzzy, python-format -#| msgid "%(process_name)s created a task from schedule [%(schedule)s]" -msgid "" -"%(process_name)s created task %(task_name)s from schedule [%(schedule)s]" -msgstr "" -"%(process_name)s hat eine Aufgabe des Zeitplans [%(schedule)s] erstellt" - -#: cluster.py:808 +#: cluster.py:394 msgid "Skipping cpu affinity because psutil was not found." msgstr "Cpu-Affinität wird übersprungen, da psutil nicht gefunden wurde." -#: cluster.py:813 +#: cluster.py:399 msgid "Faking cpu affinity because it is not supported on this platform" msgstr "" "Vortäuschen von CPU-Affinität, da diese auf dieser Plattform nicht " "unterstützt wird" -#: cluster.py:835 +#: cluster.py:421 #, python-format msgid "%(pid)s will use cpu %(affinity)s" msgstr "%(pid)s wird CPU %(affinity)s benutzen" -#: conf.py:90 +#: conf.py:122 #, python-format msgid "" "SAVE_LIMIT_PER (%(option)s) is not a valid option. Options are: 'group', " @@ -196,28 +138,28 @@ msgstr "" "'group', 'name', 'func' und None. Standard ist None." #. Translators: Cluster status descriptions -#: conf.py:207 +#: conf.py:239 msgid "Starting" msgstr "Wird gestartet" -#: conf.py:208 +#: conf.py:240 msgid "Working" msgstr "Arbeitet" -#: conf.py:209 +#: conf.py:241 msgid "Idle" msgstr "Leerlauf" -#: conf.py:210 +#: conf.py:242 msgid "Stopped" msgstr "Gestoppt" -#: conf.py:211 +#: conf.py:243 msgid "Stopping" msgstr "Wird gestoppt" #. Translators: help text for qcluster management command -#: management/commands/qcluster.py:9 +#: management/commands/qcluster.py:11 msgid "Starts a Django Q Cluster." msgstr "Startet ein Django-Q-Cluster." @@ -236,253 +178,479 @@ msgstr "Überwacht die Speichernutzung von Q Cluster" msgid "Monitors Q Cluster activity" msgstr "Q-Cluster aktiv überwachen" -#: models.py:125 -msgid "Successful task" -msgstr "Erfolgreiche Aufgabe" +#: models.py:30 models.py:469 +msgid "Task id" +msgstr "" -#: models.py:126 -msgid "Successful tasks" -msgstr "Erfolgreiche Aufgaben" +#: models.py:31 +msgid "32-character task identifier." +msgstr "" -#: models.py:141 -msgid "Failed task" -msgstr "Fehlgeschlagene Aufgabe" +#: models.py:36 models.py:235 models.py:470 +msgid "Name" +msgstr "" -#: models.py:142 -msgid "Failed tasks" -msgstr "Fehlgeschlagene Aufgaben" +#: models.py:37 +msgid "Optional human-readable name for lookup and display." +msgstr "" -#: models.py:150 models.py:234 -msgid "Please install croniter to enable cron expressions" -msgstr "Bitte installieren Sie croniter, um Cron-Ausdrücke zu aktivieren" +#: models.py:41 models.py:240 models.py:468 +msgid "Function" +msgstr "" -#: models.py:170 -msgid "e.g. 1, 2, 'John'" -msgstr "zum Beispiel 1, 2, 'John'" +#: models.py:42 +msgid "Dotted import path to the callable, e.g. myapp.tasks.job." +msgstr "" -#: models.py:172 -msgid "e.g. x=1, y=2, name='John'" -msgstr "zum Beispiel x=1, y=2, name='John'" +#: models.py:47 models.py:247 +msgid "Hook" +msgstr "" -#: models.py:186 -msgid "Once" -msgstr "Einmal" +#: models.py:48 +msgid "Optional dotted path to a callback that receives the task result." +msgstr "" -#: models.py:187 -msgid "Minutes" -msgstr "Minuten" +#: models.py:53 models.py:253 models.py:472 +msgid "Arguments" +msgstr "" -#: models.py:188 -msgid "Hourly" -msgstr "Stündlich" +#: models.py:54 +msgid "Pickled positional arguments (tuple)." +msgstr "" -#: models.py:189 -msgid "Daily" -msgstr "Täglich" +#: models.py:59 models.py:259 models.py:473 +msgid "Keyword arguments" +msgstr "" -#: models.py:190 -msgid "Weekly" -msgstr "Wöchentlich" +#: models.py:60 +msgid "Pickled keyword arguments (dict)." +msgstr "" -#: models.py:191 -msgid "Biweekly" -msgstr "Zweiwöchentlich" +#: models.py:65 +msgid "Result" +msgstr "" -#: models.py:192 -msgid "Monthly" -msgstr "Monatlich" +#: models.py:66 +msgid "Pickled return value or error payload." +msgstr "" -#: models.py:193 -msgid "Bimonthly" -msgstr "Zweimonatlich" +#: models.py:72 models.py:471 +msgid "Group" +msgstr "" -#: models.py:194 -msgid "Quarterly" -msgstr "Vierteljährlich" +#: models.py:73 +msgid "Optional group id to aggregate related tasks." +msgstr "" -#: models.py:195 -msgid "Yearly" -msgstr "Jährlich" +#: models.py:80 models.py:328 +#, fuzzy +#| msgid "Clusters" +msgid "Cluster" +msgstr "Cluster" -#: models.py:196 -msgid "Cron" -msgstr "Cron" +#: models.py:81 +msgid "Name of the cluster that executed this task." +msgstr "" -#: models.py:199 -msgid "Schedule Type" -msgstr "Zeitplan-Typ" +#: models.py:85 +msgid "Started at" +msgstr "" -#: models.py:202 -msgid "Number of minutes for the Minutes type" -msgstr "Anzahl Minuten für den Typ 'Minuten'" +#: models.py:86 +msgid "When the worker started executing the task." +msgstr "" -#: models.py:205 -msgid "Repeats" -msgstr "Wiederholungen" +#: models.py:90 +#, fuzzy +#| msgid "Stopped" +msgid "Stopped at" +msgstr "Gestoppt" -#: models.py:205 -msgid "n = n times, -1 = forever" -msgstr "n = n mal, -1 = für immer" +#: models.py:91 +msgid "When the worker finished (success or failure)." +msgstr "" -#: models.py:208 -msgid "Next Run" -msgstr "Nächste Ausführung" - -#: models.py:215 -msgid "Cron expression" -msgstr "Cron-Ausdruck" - -#: models.py:224 -msgid "Name of kwarg to pass intended schedule date" -msgstr "Name des zu passierenden Kwargs vorgesehenes Datum" - -#: models.py:299 -msgid "Scheduled task" -msgstr "Geplante Aufgabe" - -#: models.py:300 -msgid "Scheduled tasks" -msgstr "Geplante Aufgaben" - -#: models.py:326 -msgid "Queued task" -msgstr "Eingereihte Aufgabe" - -#: models.py:327 -msgid "Queued tasks" -msgstr "Eingereihte Aufgaben" - -#: monitor.py:64 monitor.py:348 -msgid "Host" -msgstr "Host" - -#: monitor.py:68 monitor.py:352 monitor.py:459 -msgid "Id" -msgstr "Id" - -#: monitor.py:72 -msgid "State" -msgstr "Status" - -#: monitor.py:76 -msgid "Pool" -msgstr "Pool" - -#: monitor.py:80 -msgid "TQ" -msgstr "TQ" - -#: monitor.py:84 -msgid "RQ" -msgstr "RQ" - -#: monitor.py:88 -msgid "RC" -msgstr "RC" - -#: monitor.py:92 -msgid "Up" -msgstr "Up" - -#: monitor.py:172 monitor.py:286 -msgid "Queued" -msgstr "Eingereiht" - -#: monitor.py:180 +#: models.py:96 monitor_terminal.py:180 msgid "Success" msgstr "Erfolg" -#: monitor.py:190 monitor.py:294 +#: models.py:97 +msgid "False if the task raised an exception or timed out." +msgstr "" + +#: models.py:101 +msgid "Attempt count" +msgstr "" + +#: models.py:102 +msgid "How many times execution was attempted." +msgstr "" + +#: models.py:172 +msgid "Task" +msgstr "" + +#: models.py:173 +msgid "Tasks" +msgstr "" + +#: models.py:194 +msgid "Successful task" +msgstr "Erfolgreiche Aufgabe" + +#: models.py:195 +msgid "Successful tasks" +msgstr "Erfolgreiche Aufgaben" + +#: models.py:210 +msgid "Failed task" +msgstr "Fehlgeschlagene Aufgabe" + +#: models.py:211 +msgid "Failed tasks" +msgstr "Fehlgeschlagene Aufgaben" + +#: models.py:219 models.py:347 +msgid "Please install croniter to enable cron expressions" +msgstr "Bitte installieren Sie croniter, um Cron-Ausdrücke zu aktivieren" + +#: models.py:236 +msgid "Optional label to identify this schedule in the admin." +msgstr "" + +#: models.py:241 +msgid "e.g. module.tasks.function" +msgstr "" + +#: models.py:248 +msgid "e.g. module.tasks.result_function" +msgstr "" + +#: models.py:254 +msgid "e.g. 1, 2, 'John'" +msgstr "zum Beispiel 1, 2, 'John'" + +#: models.py:260 +msgid "e.g. x=1, y=2, name='John'" +msgstr "zum Beispiel x=1, y=2, name='John'" + +#: models.py:274 +msgid "Once" +msgstr "Einmal" + +#: models.py:275 models.py:296 +msgid "Minutes" +msgstr "Minuten" + +#: models.py:276 +msgid "Hourly" +msgstr "Stündlich" + +#: models.py:277 +msgid "Daily" +msgstr "Täglich" + +#: models.py:278 +msgid "Weekly" +msgstr "Wöchentlich" + +#: models.py:279 +msgid "Biweekly" +msgstr "Zweiwöchentlich" + +#: models.py:280 +msgid "Monthly" +msgstr "Monatlich" + +#: models.py:281 +msgid "Bimonthly" +msgstr "Zweimonatlich" + +#: models.py:282 +msgid "Quarterly" +msgstr "Vierteljährlich" + +#: models.py:283 +msgid "Yearly" +msgstr "Jährlich" + +#: models.py:284 models.py:313 +msgid "Cron" +msgstr "Cron" + +#: models.py:290 +msgid "Schedule Type" +msgstr "Zeitplan-Typ" + +#: models.py:291 +msgid "How often this task should be enqueued." +msgstr "" + +#: models.py:297 +msgid "Number of minutes for the Minutes type" +msgstr "Anzahl Minuten für den Typ 'Minuten'" + +#: models.py:300 +msgid "Repeats" +msgstr "Wiederholungen" + +#: models.py:300 +msgid "n = n times, -1 = forever" +msgstr "n = n mal, -1 = für immer" + +#: models.py:303 +msgid "Next Run" +msgstr "Nächste Ausführung" + +#: models.py:304 +msgid "When this schedule runs next (stored in UTC)." +msgstr "" + +#: models.py:314 +msgid "Cron expression" +msgstr "Cron-Ausdruck" + +#: models.py:320 +msgid "Last task id" +msgstr "" + +#: models.py:321 +msgid "Id of the last task spawned from this schedule (read-only)." +msgstr "" + +#: models.py:329 models.py:427 +msgid "Name of the target cluster" +msgstr "" + +#: models.py:336 +msgid "Intended date kwarg" +msgstr "" + +#: models.py:337 +msgid "Name of kwarg to pass intended schedule date" +msgstr "Name des zu passierenden Kwargs vorgesehenes Datum" + +#: models.py:418 +msgid "Scheduled task" +msgstr "Geplante Aufgabe" + +#: models.py:419 +msgid "Scheduled tasks" +msgstr "Geplante Aufgaben" + +#: models.py:426 +#, fuzzy +#| msgid "Clusters" +msgid "Cluster key" +msgstr "Cluster" + +#: models.py:430 +msgid "Payload" +msgstr "" + +#: models.py:431 +msgid "Signed serialized task package (do not edit manually)." +msgstr "" + +#: models.py:435 +msgid "Lock until" +msgstr "" + +#: models.py:436 +msgid "Prevent any cluster from pulling until" +msgstr "" + +#: models.py:474 +#, fuzzy +#| msgid "Queued task" +msgid "Queue options" +msgstr "Eingereihte Aufgabe" + +#: models.py:478 +msgid "Queued task" +msgstr "Eingereihte Aufgabe" + +#: models.py:479 +msgid "Queued tasks" +msgstr "Eingereihte Aufgaben" + +#: monitor.py:41 +#, python-format +msgid "%(name)s monitoring at %(id)s" +msgstr "%(name)s beobachtet auf %(id)s" + +#: monitor.py:61 +#, python-format +msgid "Processed '%(info_name)s' (%(task_name)s)" +msgstr "[%(task_name)s] - '%(info_name)s' wurde verarbeitet" + +#: monitor.py:67 +#, python-format +msgid "Failed '%(info_name)s' (%(task_name)s) - %(task_result)s" +msgstr "'%(info_name)s' (%(task_name)s) ist fehlgeschlagen - %(task_result)s" + +#: monitor.py:74 +#, python-format +msgid "%(name)s stopped monitoring results" +msgstr "%(name)s überwacht keine Ergebnisse mehr" + +#: monitor_terminal.py:64 monitor_terminal.py:348 +msgid "Host" +msgstr "Host" + +#: monitor_terminal.py:68 monitor_terminal.py:352 monitor_terminal.py:457 +msgid "Id" +msgstr "Id" + +#: monitor_terminal.py:72 +msgid "State" +msgstr "Status" + +#: monitor_terminal.py:76 +msgid "Pool" +msgstr "Pool" + +#: monitor_terminal.py:80 +msgid "TQ" +msgstr "TQ" + +#: monitor_terminal.py:84 +msgid "RQ" +msgstr "RQ" + +#: monitor_terminal.py:88 +msgid "RC" +msgstr "RC" + +#: monitor_terminal.py:92 +msgid "Up" +msgstr "Up" + +#: monitor_terminal.py:172 monitor_terminal.py:286 +msgid "Queued" +msgstr "Eingereiht" + +#: monitor_terminal.py:190 monitor_terminal.py:294 msgid "Failures" msgstr "Fehlschläge" -#: monitor.py:201 monitor.py:498 +#: monitor_terminal.py:201 monitor_terminal.py:496 msgid "[Press q to quit]" msgstr "[Drücken Sie q zum Beenden]" -#: monitor.py:227 +#: monitor_terminal.py:227 msgid "day" msgstr "Tag" -#: monitor.py:248 +#: monitor_terminal.py:248 msgid "second" msgstr "Sekunde" -#: monitor.py:251 +#: monitor_terminal.py:251 msgid "minute" msgstr "Minute" -#: monitor.py:254 +#: monitor_terminal.py:254 msgid "hour" msgstr "Stunde" -#: monitor.py:263 +#: monitor_terminal.py:263 #, python-format msgid "-- %(prefix)s %(version)s on %(info)s --" msgstr "-- %(prefix)s %(version)s auf %(info)s --" -#: monitor.py:273 +#: monitor_terminal.py:273 msgid "Clusters" msgstr "Cluster" -#: monitor.py:277 +#: monitor_terminal.py:277 msgid "Workers" msgstr "Arbeiter" -#: monitor.py:281 +#: monitor_terminal.py:281 msgid "Restarts" msgstr "Neustarts" -#: monitor.py:290 +#: monitor_terminal.py:290 msgid "Successes" msgstr "Erfolge" -#: monitor.py:299 +#: monitor_terminal.py:299 msgid "Schedules" msgstr "Zeitpläne" -#: monitor.py:303 +#: monitor_terminal.py:303 #, python-format msgid "Tasks/%(per)s" msgstr "Aufgaben/%(per)s" -#: monitor.py:307 +#: monitor_terminal.py:307 msgid "Avg time" msgstr "Durchschnittl. Zeit" -#: monitor.py:357 +#: monitor_terminal.py:357 msgid "Available (%)" msgstr "Verfügbar (%)" -#: monitor.py:363 +#: monitor_terminal.py:363 msgid "Available (MB)" msgstr "Verfügbar (MB)" -#: monitor.py:368 +#: monitor_terminal.py:368 msgid "Total (MB)" msgstr "Insgesamt (MB)" -#: monitor.py:373 +#: monitor_terminal.py:373 msgid "Sentinel (MB)" msgstr "Sentinel (MB)" -#: monitor.py:379 +#: monitor_terminal.py:379 msgid "Monitor (MB)" msgstr "Monitor (MB)" -#: monitor.py:385 +#: monitor_terminal.py:385 msgid "Workers (MB)" msgstr "Arbeiter (MB)" -#: monitor.py:487 +#: monitor_terminal.py:485 #, python-format msgid "Available lowest (): %(memory_percent)s ((at)s)" msgstr "Niedrigste verfügbar (): %(memory_percent)s ((at)s)" -#: monitor.py:509 +#: monitor_terminal.py:507 msgid "No clusters appear to be running." msgstr "Es scheinen keine Cluster zu laufen." +#: pusher.py:40 +#, python-format +#| msgid "%(process_name)s pushing tasks at %(id)s" +msgid "%(name)s pushing tasks at %(id)s" +msgstr "%(name)s veröffentlicht Aufagaben auf %(id)s" + +#: pusher.py:67 +#, python-format +msgid "queueing from %(list_key)s" +msgstr "Einreihen von %(list_key)s" + +#: pusher.py:71 +#, python-format +msgid "%(name)s stopped pushing tasks" +msgstr "%(name)s veröffentlicht keine Aufgaben mehr" + +#: scheduler.py:110 +#, python-format +msgid "%(process_name)s failed to create a task from schedule [%(schedule)s]" +msgstr "" +"%(process_name)s konnte keine Aufgabe von Zeitplan [%(schedule)s] erstellen" + +#: scheduler.py:121 +#, fuzzy, python-format +#| msgid "%(process_name)s created a task from schedule [%(schedule)s]" +msgid "" +"%(process_name)s created task %(task_name)s from schedule [%(schedule)s]" +msgstr "" +"%(process_name)s hat eine Aufgabe des Zeitplans [%(schedule)s] erstellt" + #: signals.py:22 #, python-format msgid "malformed return hook '%(hook)s' for [%(name)s]" @@ -493,6 +661,26 @@ msgstr "Ungültiger Return-Hook '%(hook)s' für [%(name)s]" msgid "return hook %(hook)s failed on [%(name)s] because %(error)s" msgstr "Return-Hook %(hook)s für [%(name)s] ist gescheitert: %(error)s" +#: timeout.py:30 timeout.py:43 +msgid "SIGALARM is not available on your platform" +msgstr "" + +#: worker.py:49 +#, python-format +msgid "%(proc_name)s ready for work at %(id)s" +msgstr "%(proc_name)s ist bereit für Arbeit auf %(id)s" + +#: worker.py:69 +#, fuzzy, python-format +#| msgid "%(proc_name)s processing '%(func_name)s' (%(task_name)s)" +msgid "%(proc_name)s processing %(task_name)s '%(func_name)s'" +msgstr "%(proc_name)s verarbeitet '%(func_name)s' (%(task_name)s)" + +#: worker.py:135 +#, python-format +msgid "%(proc_name)s stopped doing work" +msgstr "%(proc_name)s hat die Arbeit beendet" + #, python-format #~ msgid "" #~ "Could not process '%(func_name)s'. Check the location of the function and " diff --git a/django_q/locale/fr/LC_MESSAGES/django.po b/django_q/locale/fr/LC_MESSAGES/django.po index e6f6e37..8717ba6 100644 --- a/django_q/locale/fr/LC_MESSAGES/django.po +++ b/django_q/locale/fr/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-26 01:38+0000\n" +"POT-Creation-Date: 2026-04-17 21:10+0000\n" "PO-Revision-Date: 2018-08-05 18:28+0200\n" "Last-Translator: Thierry BOULOGNE \n" "Language-Team: \n" @@ -17,36 +17,44 @@ msgstr "" "X-Generator: Poedit 2.1.1\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: admin.py:43 +#: admin.py:30 msgid "Resubmit selected tasks to queue" msgstr "Resoumettre les tâches sélectionnées à la file d'attente" -#: admin.py:107 models.py:293 +#: admin.py:64 +msgid "Time Taken" +msgstr "" + +#: admin.py:95 +msgid "Short result" +msgstr "" + +#: admin.py:142 models.py:412 #, fuzzy #| msgid "Success" msgid "success" msgstr "succès" -#: admin.py:119 models.py:295 +#: admin.py:154 models.py:414 msgid "last_run" msgstr "" -#: cluster.py:79 +#: cluster.py:75 #, python-format msgid "Q Cluster %(name)s starting." msgstr "Démarrage de Q Cluster-%(name)s." -#: cluster.py:87 +#: cluster.py:83 #, python-format msgid "Q Cluster %(name)s stopping." msgstr "Arrêt de Q Cluster-%(name)s." -#: cluster.py:90 +#: cluster.py:86 #, python-format msgid "Q Cluster %(name)s has stopped." msgstr "Q Cluster-%(name)s a été arrêté." -#: cluster.py:97 +#: cluster.py:93 #, python-format msgid "%(name)s got signal %(signal)s" msgstr "%(name)s à reçu le signal %(signal)s" @@ -61,7 +69,7 @@ msgstr "surveillant %(name)s réincarné après un arrêt intempestif" msgid "reincarnated pusher %(name)s after sudden death" msgstr "répartiteur %(name)s réincarné après un arrêt intempestif" -#: cluster.py:250 +#: cluster.py:262 #, python-format msgid "" "reincarnated worker %(name)s after timeout while processing task " @@ -70,122 +78,57 @@ msgstr "" "processus %(name)s réincarné, délai de traitement dépassé pour la tâche " "%(task_name)s" -#: cluster.py:255 +#: cluster.py:265 #, python-format msgid "reincarnated worker %(name)s after timeout" msgstr "processus %(name)s réincarné, délai de traitement dépassé" -#: cluster.py:260 +#: cluster.py:270 #, python-format msgid "recycled worker %(name)s" msgstr "processus recyclé %(name)s" -#: cluster.py:263 +#: cluster.py:273 #, python-format msgid "reincarnated worker %(name)s after death" msgstr "processus réintégré %(name)s après arrêt" -#: cluster.py:287 +#: cluster.py:297 #, python-format msgid "%(name)s guarding cluster %(cluster_name)s" msgstr "%(name)s surveillance du cluster à %(cluster_name)s" -#: cluster.py:296 +#: cluster.py:307 #, python-format msgid "Q Cluster %(cluster_name)s running." msgstr "Démarrage de Q Cluster-%(cluster_name)s." -#: cluster.py:332 +#: cluster.py:346 #, python-format msgid "%(name)s stopping cluster processes" msgstr "%(name)s arrêt des processus du cluster" -#: cluster.py:357 +#: cluster.py:371 #, python-format msgid "%(name)s waiting for the monitor." msgstr "%(name)s en attente du surveillant." -#: cluster.py:383 -#, python-format -msgid "%(name)s pushing tasks at %(id)s" -msgstr "%(name)s répartit les tâches %(id)s" - -#: cluster.py:407 -#, python-format -msgid "queueing from %(list_key)s" -msgstr "mise en file d'attente de %(list_key)s" - -#: cluster.py:411 -#, python-format -msgid "%(name)s stopped pushing tasks" -msgstr "%(name)s a cessé de répartir les tâches" - -#: cluster.py:426 -#, python-format -msgid "%(name)s monitoring at %(id)s" -msgstr "%(name)s surveille les résultats %(id)s" - -#: cluster.py:445 -#, python-format -msgid "Processed '%(info_name)s' (%(task_name)s)" -msgstr "traité '%(info_name)s' (%(task_name)s)" - -#: cluster.py:451 -#, python-format -msgid "Failed '%(info_name)s' (%(task_name)s) - %(task_result)s" -msgstr "Manqué '%(info_name)s' (%(task_name)s) - %(task_result)s" - -#: cluster.py:458 -#, python-format -msgid "%(name)s stopped monitoring results" -msgstr "%(name)s a cessé de de surveiller les résultats" - -#: cluster.py:474 -#, python-format -msgid "%(proc_name)s ready for work at %(id)s" -msgstr "%(proc_name)s prêt pour le travail à %(id)s" - -#: cluster.py:494 -#, fuzzy, python-format -msgid "%(proc_name)s processing %(task_name)s '%(func_name)s'" -msgstr "%(proc_name)s exécute %(task_name)s '%(func_name)s'" - -#: cluster.py:546 -#, python-format -msgid "%(proc_name)s stopped doing work" -msgstr "%(proc_name)s a cessé de travailler" - -#: cluster.py:751 -#, python-format -msgid "%(process_name)s failed to create a task from schedule [%(schedule)s]" -msgstr "" -"%(process_name)s Echec de la création d'une tâche à partir de Schedule " -"[%(schedule)s]" - -#: cluster.py:762 -#, python-format -msgid "" -"%(process_name)s created task %(task_name)s from schedule [%(schedule)s]" -msgstr "" -"%(process_name)s a créé la tâche %(task_name)s à partir de Schedule " -"[%(schedule)s]" - -#: cluster.py:808 +#: cluster.py:394 msgid "Skipping cpu affinity because psutil was not found." msgstr "L'affinité cpu ne sera pas définie car psutil n'a pas été trouvé." -#: cluster.py:813 +#: cluster.py:399 msgid "Faking cpu affinity because it is not supported on this platform" msgstr "" "Simulation de l'affinité cpu parce qu'elle n'est pas supportée sur cette " "plateforme." -#: cluster.py:835 +#: cluster.py:421 #, python-format msgid "%(pid)s will use cpu %(affinity)s" msgstr "%(pid)s utilisera le CPU %(affinity)s" -#: conf.py:90 +#: conf.py:122 #, python-format msgid "" "SAVE_LIMIT_PER (%(option)s) is not a valid option. Options are: 'group', " @@ -195,28 +138,28 @@ msgstr "" "'group', 'name', 'func' et None. La valeur par défaut est None." #. Translators: Cluster status descriptions -#: conf.py:207 +#: conf.py:239 msgid "Starting" msgstr "Démarrage" -#: conf.py:208 +#: conf.py:240 msgid "Working" msgstr "Actif" -#: conf.py:209 +#: conf.py:241 msgid "Idle" msgstr "En attente" -#: conf.py:210 +#: conf.py:242 msgid "Stopped" msgstr "Arrêté" -#: conf.py:211 +#: conf.py:243 msgid "Stopping" msgstr "En cours d’arrêt" #. Translators: help text for qcluster management command -#: management/commands/qcluster.py:9 +#: management/commands/qcluster.py:11 msgid "Starts a Django Q Cluster." msgstr "Démarre un cluster Django Q." @@ -237,259 +180,485 @@ msgstr "Surveille l'utilisation mémoire du Q cluster" msgid "Monitors Q Cluster activity" msgstr "Surveille l'activité de Q cluster" -#: models.py:125 +#: models.py:30 models.py:469 +msgid "Task id" +msgstr "" + +#: models.py:31 +msgid "32-character task identifier." +msgstr "" + +#: models.py:36 models.py:235 models.py:470 +msgid "Name" +msgstr "" + +#: models.py:37 +msgid "Optional human-readable name for lookup and display." +msgstr "" + +#: models.py:41 models.py:240 models.py:468 +msgid "Function" +msgstr "" + +#: models.py:42 +msgid "Dotted import path to the callable, e.g. myapp.tasks.job." +msgstr "" + +#: models.py:47 models.py:247 +msgid "Hook" +msgstr "" + +#: models.py:48 +msgid "Optional dotted path to a callback that receives the task result." +msgstr "" + +#: models.py:53 models.py:253 models.py:472 +msgid "Arguments" +msgstr "" + +#: models.py:54 +msgid "Pickled positional arguments (tuple)." +msgstr "" + +#: models.py:59 models.py:259 models.py:473 +msgid "Keyword arguments" +msgstr "" + +#: models.py:60 +msgid "Pickled keyword arguments (dict)." +msgstr "" + +#: models.py:65 +msgid "Result" +msgstr "" + +#: models.py:66 +msgid "Pickled return value or error payload." +msgstr "" + +#: models.py:72 models.py:471 +msgid "Group" +msgstr "" + +#: models.py:73 +msgid "Optional group id to aggregate related tasks." +msgstr "" + +#: models.py:80 models.py:328 +#, fuzzy +#| msgid "Clusters" +msgid "Cluster" +msgstr "Grappes" + +#: models.py:81 +msgid "Name of the cluster that executed this task." +msgstr "" + +#: models.py:85 +msgid "Started at" +msgstr "" + +#: models.py:86 +msgid "When the worker started executing the task." +msgstr "" + +#: models.py:90 +#, fuzzy +#| msgid "Stopped" +msgid "Stopped at" +msgstr "Arrêté" + +#: models.py:91 +msgid "When the worker finished (success or failure)." +msgstr "" + +#: models.py:96 monitor_terminal.py:180 +msgid "Success" +msgstr "Succès" + +#: models.py:97 +msgid "False if the task raised an exception or timed out." +msgstr "" + +#: models.py:101 +msgid "Attempt count" +msgstr "" + +#: models.py:102 +msgid "How many times execution was attempted." +msgstr "" + +#: models.py:172 +msgid "Task" +msgstr "" + +#: models.py:173 +msgid "Tasks" +msgstr "" + +#: models.py:194 msgid "Successful task" msgstr "Tâche réussie" -#: models.py:126 +#: models.py:195 msgid "Successful tasks" msgstr "Tâches réussies" -#: models.py:141 +#: models.py:210 msgid "Failed task" msgstr "Tâche échoué" -#: models.py:142 +#: models.py:211 msgid "Failed tasks" msgstr "Tâches échouées" -#: models.py:150 models.py:234 +#: models.py:219 models.py:347 msgid "Please install croniter to enable cron expressions" msgstr "Veuillez installer croniter pour activer les expressions cron." -#: models.py:170 +#: models.py:236 +msgid "Optional label to identify this schedule in the admin." +msgstr "" + +#: models.py:241 +msgid "e.g. module.tasks.function" +msgstr "" + +#: models.py:248 +msgid "e.g. module.tasks.result_function" +msgstr "" + +#: models.py:254 msgid "e.g. 1, 2, 'John'" msgstr "ex. 1, 2, ‘Jean’" -#: models.py:172 +#: models.py:260 msgid "e.g. x=1, y=2, name='John'" msgstr "p. ex. x = 1, y = 2, Nom = ‘Jean’" -#: models.py:186 +#: models.py:274 msgid "Once" msgstr "Une fois" -#: models.py:187 +#: models.py:275 models.py:296 msgid "Minutes" msgstr "Minutes" -#: models.py:188 +#: models.py:276 msgid "Hourly" msgstr "Toutes les heures" -#: models.py:189 +#: models.py:277 msgid "Daily" msgstr "Quotidien" -#: models.py:190 +#: models.py:278 msgid "Weekly" msgstr "Hebdomadaire" -#: models.py:191 +#: models.py:279 #, fuzzy #| msgid "Weekly" msgid "Biweekly" msgstr "Bihebdomadaire" -#: models.py:192 +#: models.py:280 msgid "Monthly" msgstr "Mensuel" -#: models.py:193 +#: models.py:281 #, fuzzy #| msgid "Monthly" msgid "Bimonthly" msgstr "Bimestriel" -#: models.py:194 +#: models.py:282 msgid "Quarterly" msgstr "Trimestriel" -#: models.py:195 +#: models.py:283 msgid "Yearly" msgstr "Annuel" -#: models.py:196 +#: models.py:284 models.py:313 msgid "Cron" msgstr "Cron" -#: models.py:199 +#: models.py:290 msgid "Schedule Type" msgstr "Type de plannification" -#: models.py:202 +#: models.py:291 +msgid "How often this task should be enqueued." +msgstr "" + +#: models.py:297 msgid "Number of minutes for the Minutes type" msgstr "Nombre de minutes pour le type de minutes" -#: models.py:205 +#: models.py:300 msgid "Repeats" msgstr "Répéter" -#: models.py:205 +#: models.py:300 msgid "n = n times, -1 = forever" msgstr "n = n fois,-1 = Toujours" -#: models.py:208 +#: models.py:303 msgid "Next Run" msgstr "Prochaine exécution" -#: models.py:215 +#: models.py:304 +msgid "When this schedule runs next (stored in UTC)." +msgstr "" + +#: models.py:314 msgid "Cron expression" msgstr "Expression Cron" -#: models.py:224 +#: models.py:320 +msgid "Last task id" +msgstr "" + +#: models.py:321 +msgid "Id of the last task spawned from this schedule (read-only)." +msgstr "" + +#: models.py:329 models.py:427 +msgid "Name of the target cluster" +msgstr "" + +#: models.py:336 +msgid "Intended date kwarg" +msgstr "" + +#: models.py:337 msgid "Name of kwarg to pass intended schedule date" msgstr "Nom du kwarg à passer Date prévue de l'horaire" -#: models.py:299 +#: models.py:418 msgid "Scheduled task" msgstr "Tâche planifiée" -#: models.py:300 +#: models.py:419 msgid "Scheduled tasks" msgstr "Tâches planifiées" -#: models.py:326 +#: models.py:426 +#, fuzzy +#| msgid "Clusters" +msgid "Cluster key" +msgstr "Grappes" + +#: models.py:430 +msgid "Payload" +msgstr "" + +#: models.py:431 +msgid "Signed serialized task package (do not edit manually)." +msgstr "" + +#: models.py:435 +msgid "Lock until" +msgstr "" + +#: models.py:436 +msgid "Prevent any cluster from pulling until" +msgstr "" + +#: models.py:474 +#, fuzzy +#| msgid "Queued task" +msgid "Queue options" +msgstr "Tâche en file d'attente" + +#: models.py:478 msgid "Queued task" msgstr "Tâche en file d'attente" -#: models.py:327 +#: models.py:479 msgid "Queued tasks" msgstr "Tâches en file d'attente" -#: monitor.py:64 monitor.py:348 +#: monitor.py:41 +#, python-format +msgid "%(name)s monitoring at %(id)s" +msgstr "%(name)s surveille les résultats %(id)s" + +#: monitor.py:61 +#, python-format +msgid "Processed '%(info_name)s' (%(task_name)s)" +msgstr "traité '%(info_name)s' (%(task_name)s)" + +#: monitor.py:67 +#, python-format +msgid "Failed '%(info_name)s' (%(task_name)s) - %(task_result)s" +msgstr "Manqué '%(info_name)s' (%(task_name)s) - %(task_result)s" + +#: monitor.py:74 +#, python-format +msgid "%(name)s stopped monitoring results" +msgstr "%(name)s a cessé de de surveiller les résultats" + +#: monitor_terminal.py:64 monitor_terminal.py:348 msgid "Host" msgstr "Hôte" -#: monitor.py:68 monitor.py:352 monitor.py:459 +#: monitor_terminal.py:68 monitor_terminal.py:352 monitor_terminal.py:457 msgid "Id" msgstr "Id" -#: monitor.py:72 +#: monitor_terminal.py:72 msgid "State" msgstr "Statut" -#: monitor.py:76 +#: monitor_terminal.py:76 msgid "Pool" msgstr "Piscine" -#: monitor.py:80 +#: monitor_terminal.py:80 msgid "TQ" msgstr "TQ" -#: monitor.py:84 +#: monitor_terminal.py:84 msgid "RQ" msgstr "RQ" -#: monitor.py:88 +#: monitor_terminal.py:88 msgid "RC" msgstr "RC" -#: monitor.py:92 +#: monitor_terminal.py:92 msgid "Up" msgstr "Haut" -#: monitor.py:172 monitor.py:286 +#: monitor_terminal.py:172 monitor_terminal.py:286 msgid "Queued" msgstr "En file d'attente" -#: monitor.py:180 -msgid "Success" -msgstr "Succès" - -#: monitor.py:190 monitor.py:294 +#: monitor_terminal.py:190 monitor_terminal.py:294 msgid "Failures" msgstr "Défaillances" -#: monitor.py:201 monitor.py:498 +#: monitor_terminal.py:201 monitor_terminal.py:496 msgid "[Press q to quit]" msgstr "[appuyez sur q pour quitter]" -#: monitor.py:227 +#: monitor_terminal.py:227 msgid "day" msgstr "jour" -#: monitor.py:248 +#: monitor_terminal.py:248 msgid "second" msgstr "seconde" -#: monitor.py:251 +#: monitor_terminal.py:251 msgid "minute" msgstr "minute" -#: monitor.py:254 +#: monitor_terminal.py:254 msgid "hour" msgstr "heure" -#: monitor.py:263 +#: monitor_terminal.py:263 #, python-format msgid "-- %(prefix)s %(version)s on %(info)s --" msgstr "--%(prefix)s %(version)s sur %(info)s --" -#: monitor.py:273 +#: monitor_terminal.py:273 msgid "Clusters" msgstr "Grappes" -#: monitor.py:277 +#: monitor_terminal.py:277 msgid "Workers" msgstr "Processus" -#: monitor.py:281 +#: monitor_terminal.py:281 msgid "Restarts" msgstr "Redémarrages" -#: monitor.py:290 +#: monitor_terminal.py:290 msgid "Successes" msgstr "Succès" -#: monitor.py:299 +#: monitor_terminal.py:299 msgid "Schedules" msgstr "Planifications" -#: monitor.py:303 +#: monitor_terminal.py:303 #, python-format msgid "Tasks/%(per)s" msgstr "Tâches/%(per)s" -#: monitor.py:307 +#: monitor_terminal.py:307 msgid "Avg time" msgstr "Temps Moyen" -#: monitor.py:357 +#: monitor_terminal.py:357 msgid "Available (%)" msgstr "" -#: monitor.py:363 +#: monitor_terminal.py:363 msgid "Available (MB)" msgstr "Disponible sur (MB)" -#: monitor.py:368 +#: monitor_terminal.py:368 msgid "Total (MB)" msgstr "Total (MB)" -#: monitor.py:373 +#: monitor_terminal.py:373 msgid "Sentinel (MB)" msgstr "Sentinel (MB)" -#: monitor.py:379 +#: monitor_terminal.py:379 msgid "Monitor (MB)" msgstr "Monitor (MB)" -#: monitor.py:385 +#: monitor_terminal.py:385 #, fuzzy #| msgid "Workers" msgid "Workers (MB)" msgstr "Processus (MB)" -#: monitor.py:487 +#: monitor_terminal.py:485 #, python-format msgid "Available lowest (): %(memory_percent)s ((at)s)" msgstr "Disponible le plus bas () : %(memory_percent)s ((at)s)" -#: monitor.py:509 +#: monitor_terminal.py:507 msgid "No clusters appear to be running." msgstr "Aucun cluster ne semble être en cours d'exécution." +#: pusher.py:40 +#, python-format +msgid "%(name)s pushing tasks at %(id)s" +msgstr "%(name)s répartit les tâches %(id)s" + +#: pusher.py:67 +#, python-format +msgid "queueing from %(list_key)s" +msgstr "mise en file d'attente de %(list_key)s" + +#: pusher.py:71 +#, python-format +msgid "%(name)s stopped pushing tasks" +msgstr "%(name)s a cessé de répartir les tâches" + +#: scheduler.py:110 +#, python-format +msgid "%(process_name)s failed to create a task from schedule [%(schedule)s]" +msgstr "" +"%(process_name)s Echec de la création d'une tâche à partir de Schedule " +"[%(schedule)s]" + +#: scheduler.py:121 +#, python-format +msgid "" +"%(process_name)s created task %(task_name)s from schedule [%(schedule)s]" +msgstr "" +"%(process_name)s a créé la tâche %(task_name)s à partir de Schedule " +"[%(schedule)s]" + #: signals.py:22 #, python-format msgid "malformed return hook '%(hook)s' for [%(name)s]" @@ -500,6 +669,25 @@ msgstr "hook de retour '%(hook)s' mal formé pour [%(name)s]" msgid "return hook %(hook)s failed on [%(name)s] because %(error)s" msgstr "hook de retour %(hook)s a échoué sur [%(name)s] à cause de %(error)s" +#: timeout.py:30 timeout.py:43 +msgid "SIGALARM is not available on your platform" +msgstr "" + +#: worker.py:49 +#, python-format +msgid "%(proc_name)s ready for work at %(id)s" +msgstr "%(proc_name)s prêt pour le travail à %(id)s" + +#: worker.py:69 +#, fuzzy, python-format +msgid "%(proc_name)s processing %(task_name)s '%(func_name)s'" +msgstr "%(proc_name)s exécute %(task_name)s '%(func_name)s'" + +#: worker.py:135 +#, python-format +msgid "%(proc_name)s stopped doing work" +msgstr "%(proc_name)s a cessé de travailler" + #, python-format #~ msgid "" #~ "Could not process '%(func_name)s'. Check the location of the function and " diff --git a/django_q/locale/ru/LC_MESSAGES/django.po b/django_q/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 0000000..7b55cf5 --- /dev/null +++ b/django_q/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,676 @@ +# Russian translation for django-q. +# Copyright (C) Django Q authors +# This file is distributed under the same license as the django-q package. +# +msgid "" +msgstr "" +"Project-Id-Version: django-q\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-04-17 21:07+0000\n" +"PO-Revision-Date: 2026-04-04 12:00+0000\n" +"Last-Translator: \n" +"Language-Team: Russian\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " +"(n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: django_q/admin.py:30 +msgid "Resubmit selected tasks to queue" +msgstr "Повторно отправить выбранные задачи в очередь" + +#: django_q/admin.py:64 +msgid "Time Taken" +msgstr "Время выполнения" + +#: django_q/admin.py:95 +msgid "Short result" +msgstr "Краткий результат" + +#: django_q/admin.py:142 django_q/models.py:412 +msgid "success" +msgstr "успех" + +#: django_q/admin.py:154 django_q/models.py:414 +msgid "last_run" +msgstr "последний запуск" + +#: django_q/cluster.py:75 +#, python-format +msgid "Q Cluster %(name)s starting." +msgstr "Запуск кластера Q %(name)s." + +#: django_q/cluster.py:83 +#, python-format +msgid "Q Cluster %(name)s stopping." +msgstr "Остановка кластера Q %(name)s." + +#: django_q/cluster.py:86 +#, python-format +msgid "Q Cluster %(name)s has stopped." +msgstr "Кластер Q %(name)s остановлен." + +#: django_q/cluster.py:93 +#, python-format +msgid "%(name)s got signal %(signal)s" +msgstr "%(name)s получил сигнал %(signal)s" + +#: django_q/cluster.py:224 +#, python-format +msgid "reincarnated monitor %(name)s after sudden death" +msgstr "монитор %(name)s перезапущен после аварийного завершения" + +#: django_q/cluster.py:230 +#, python-format +msgid "reincarnated pusher %(name)s after sudden death" +msgstr "пушер %(name)s перезапущен после аварийного завершения" + +#: django_q/cluster.py:262 +#, python-format +msgid "" +"reincarnated worker %(name)s after timeout while processing task " +"%(task_name)s" +msgstr "" +"воркер %(name)s перезапущен по таймауту при выполнении задачи %(task_name)s" + +#: django_q/cluster.py:265 +#, python-format +msgid "reincarnated worker %(name)s after timeout" +msgstr "воркер %(name)s перезапущен по таймауту" + +#: django_q/cluster.py:270 +#, python-format +msgid "recycled worker %(name)s" +msgstr "воркер %(name)s перезапущен (recycle)" + +#: django_q/cluster.py:273 +#, python-format +msgid "reincarnated worker %(name)s after death" +msgstr "воркер %(name)s перезапущен после сбоя" + +#: django_q/cluster.py:297 +#, python-format +msgid "%(name)s guarding cluster %(cluster_name)s" +msgstr "%(name)s обслуживает кластер %(cluster_name)s" + +#: django_q/cluster.py:307 +#, python-format +msgid "Q Cluster %(cluster_name)s running." +msgstr "Кластер Q %(cluster_name)s работает." + +#: django_q/cluster.py:346 +#, python-format +msgid "%(name)s stopping cluster processes" +msgstr "%(name)s останавливает процессы кластера" + +#: django_q/cluster.py:371 +#, python-format +msgid "%(name)s waiting for the monitor." +msgstr "%(name)s ожидает монитор." + +#: django_q/cluster.py:394 +msgid "Skipping cpu affinity because psutil was not found." +msgstr "Привязка к CPU пропущена: не найден psutil." + +#: django_q/cluster.py:399 +msgid "Faking cpu affinity because it is not supported on this platform" +msgstr "Имитация привязки к CPU: на этой платформе не поддерживается" + +#: django_q/cluster.py:421 +#, python-format +msgid "%(pid)s will use cpu %(affinity)s" +msgstr "%(pid)s будет использовать CPU %(affinity)s" + +#: django_q/conf.py:122 +#, python-format +msgid "" +"SAVE_LIMIT_PER (%(option)s) is not a valid option. Options are: 'group', " +"'name', 'func' and None. Default is None." +msgstr "" +"SAVE_LIMIT_PER (%(option)s) — недопустимое значение. Допустимо: «group», " +"«name», «func» и None. По умолчанию None." + +#. Translators: Cluster status descriptions +#: django_q/conf.py:239 +msgid "Starting" +msgstr "Запуск" + +#: django_q/conf.py:240 +msgid "Working" +msgstr "Работает" + +#: django_q/conf.py:241 +msgid "Idle" +msgstr "Простой" + +#: django_q/conf.py:242 +msgid "Stopped" +msgstr "Остановлен" + +#: django_q/conf.py:243 +msgid "Stopping" +msgstr "Останавливается" + +#. Translators: help text for qcluster management command +#: django_q/management/commands/qcluster.py:11 +msgid "Starts a Django Q Cluster." +msgstr "Запускает кластер Django Q." + +#. Translators: help text for qinfo management command +#: django_q/management/commands/qinfo.py:11 +msgid "General information over all clusters." +msgstr "Общая информация по всем кластерам." + +#. Translators: help text for qmemory management command +#: django_q/management/commands/qmemory.py:9 +msgid "Monitors Q Cluster memory usage" +msgstr "Мониторинг использования памяти кластером Q" + +#. Translators: help text for qmonitor management command +#: django_q/management/commands/qmonitor.py:9 +msgid "Monitors Q Cluster activity" +msgstr "Мониторинг активности кластера Q" + +#: django_q/models.py:30 django_q/models.py:469 +msgid "Task id" +msgstr "Идентификатор задачи" + +#: django_q/models.py:31 +msgid "32-character task identifier." +msgstr "32-символьный идентификатор задачи." + +#: django_q/models.py:36 django_q/models.py:235 django_q/models.py:470 +msgid "Name" +msgstr "Имя" + +#: django_q/models.py:37 +msgid "Optional human-readable name for lookup and display." +msgstr "Необязательное имя для поиска и отображения." + +#: django_q/models.py:41 django_q/models.py:240 django_q/models.py:468 +msgid "Function" +msgstr "Функция" + +#: django_q/models.py:42 +msgid "Dotted import path to the callable, e.g. myapp.tasks.job." +msgstr "Путь импорта к вызываемому объекту, напр. myapp.tasks.job." + +#: django_q/models.py:47 django_q/models.py:247 +msgid "Hook" +msgstr "Обработчик" + +#: django_q/models.py:48 +msgid "Optional dotted path to a callback that receives the task result." +msgstr "Необязательный путь к функции, получающей результат задачи." + +#: django_q/models.py:53 django_q/models.py:253 django_q/models.py:472 +msgid "Arguments" +msgstr "Аргументы" + +#: django_q/models.py:54 +msgid "Pickled positional arguments (tuple)." +msgstr "Сериализованные позиционные аргументы (tuple)." + +#: django_q/models.py:59 django_q/models.py:259 django_q/models.py:473 +msgid "Keyword arguments" +msgstr "Именованные аргументы" + +#: django_q/models.py:60 +msgid "Pickled keyword arguments (dict)." +msgstr "Сериализованные именованные аргументы (dict)." + +#: django_q/models.py:65 +msgid "Result" +msgstr "Результат" + +#: django_q/models.py:66 +msgid "Pickled return value or error payload." +msgstr "Сериализованный результат или данные об ошибке." + +#: django_q/models.py:72 django_q/models.py:471 +msgid "Group" +msgstr "Группа" + +#: django_q/models.py:73 +msgid "Optional group id to aggregate related tasks." +msgstr "Необязательный идентификатор группы связанных задач." + +#: django_q/models.py:80 django_q/models.py:328 +msgid "Cluster" +msgstr "Кластер" + +#: django_q/models.py:81 +msgid "Name of the cluster that executed this task." +msgstr "Имя кластера, выполнившего эту задачу." + +#: django_q/models.py:85 +msgid "Started at" +msgstr "Начало выполнения" + +#: django_q/models.py:86 +msgid "When the worker started executing the task." +msgstr "Когда воркер начал выполнение задачи." + +#: django_q/models.py:90 +msgid "Stopped at" +msgstr "Окончание выполнения" + +#: django_q/models.py:91 +msgid "When the worker finished (success or failure)." +msgstr "Когда воркер завершил выполнение (успех или ошибка)." + +#: django_q/models.py:96 django_q/monitor_terminal.py:180 +msgid "Success" +msgstr "Успех" + +#: django_q/models.py:97 +msgid "False if the task raised an exception or timed out." +msgstr "Ложь, если задача завершилась исключением или таймаутом." + +#: django_q/models.py:101 +msgid "Attempt count" +msgstr "Число попыток" + +#: django_q/models.py:102 +msgid "How many times execution was attempted." +msgstr "Сколько раз выполнялась попытка запуска." + +#: django_q/models.py:172 +msgid "Task" +msgstr "Задача" + +#: django_q/models.py:173 +msgid "Tasks" +msgstr "Задачи" + +#: django_q/models.py:194 +msgid "Successful task" +msgstr "Успешная задача" + +#: django_q/models.py:195 +msgid "Successful tasks" +msgstr "Успешные задачи" + +#: django_q/models.py:210 +msgid "Failed task" +msgstr "Неудачная задача" + +#: django_q/models.py:211 +msgid "Failed tasks" +msgstr "Неудачные задачи" + +#: django_q/models.py:219 django_q/models.py:347 +msgid "Please install croniter to enable cron expressions" +msgstr "Установите croniter для поддержки cron-выражений" + +#: django_q/models.py:236 +msgid "Optional label to identify this schedule in the admin." +msgstr "Необязательная подпись для расписания в админке." + +#: django_q/models.py:241 +msgid "e.g. module.tasks.function" +msgstr "например: module.tasks.function" + +#: django_q/models.py:248 +msgid "e.g. module.tasks.result_function" +msgstr "например: module.tasks.result_function " + +#: django_q/models.py:254 +msgid "e.g. 1, 2, 'John'" +msgstr "например: 1, 2, 'Алимхан'" + +#: django_q/models.py:260 +msgid "e.g. x=1, y=2, name='John'" +msgstr "например: x=1, y=2, name='Алимхан'" + +#: django_q/models.py:274 +msgid "Once" +msgstr "Один раз" + +#: django_q/models.py:275 django_q/models.py:296 +msgid "Minutes" +msgstr "Минуты" + +#: django_q/models.py:276 +msgid "Hourly" +msgstr "Ежечасно" + +#: django_q/models.py:277 +msgid "Daily" +msgstr "Ежедневно" + +#: django_q/models.py:278 +msgid "Weekly" +msgstr "Еженедельно" + +#: django_q/models.py:279 +msgid "Biweekly" +msgstr "Раз в две недели" + +#: django_q/models.py:280 +msgid "Monthly" +msgstr "Ежемесячно" + +#: django_q/models.py:281 +msgid "Bimonthly" +msgstr "Раз в два месяца" + +#: django_q/models.py:282 +msgid "Quarterly" +msgstr "Ежеквартально" + +#: django_q/models.py:283 +msgid "Yearly" +msgstr "Ежегодно" + +#: django_q/models.py:284 django_q/models.py:313 +msgid "Cron" +msgstr "Cron" + +#: django_q/models.py:290 +msgid "Schedule Type" +msgstr "Тип расписания" + +#: django_q/models.py:291 +msgid "How often this task should be enqueued." +msgstr "Как часто ставить эту задачу в очередь." + +#: django_q/models.py:297 +msgid "Number of minutes for the Minutes type" +msgstr "Число минут для типа «Минуты»" + +#: django_q/models.py:300 +msgid "Repeats" +msgstr "Повторы" + +#: django_q/models.py:300 +msgid "n = n times, -1 = forever" +msgstr "n — число повторов, -1 — бесконечно" + +#: django_q/models.py:303 +msgid "Next Run" +msgstr "Следующий запуск" + +#: django_q/models.py:304 +msgid "When this schedule runs next (stored in UTC)." +msgstr "Когда следующий запуск по расписанию (в UTC)." + +#: django_q/models.py:314 +msgid "Cron expression" +msgstr "Cron-выражение" + +#: django_q/models.py:320 +msgid "Last task id" +msgstr "ID последней задачи" + +#: django_q/models.py:321 +msgid "Id of the last task spawned from this schedule (read-only)." +msgstr "Идентификатор последней задачи по этому расписанию (read-only)." + +#: django_q/models.py:329 django_q/models.py:427 +msgid "Name of the target cluster" +msgstr "Имя целевого кластера" + +#: django_q/models.py:336 +msgid "Intended date kwarg" +msgstr "Имя аргумента для даты запуска" + +#: django_q/models.py:337 +msgid "Name of kwarg to pass intended schedule date" +msgstr "Имя kwargs для передачи запланированной даты" + +#: django_q/models.py:418 +msgid "Scheduled task" +msgstr "Запланированная задача" + +#: django_q/models.py:419 +msgid "Scheduled tasks" +msgstr "Запланированные задачи" + +#: django_q/models.py:426 +msgid "Cluster key" +msgstr "Ключ кластера" + +#: django_q/models.py:430 +msgid "Payload" +msgstr "Данные задачи" + +#: django_q/models.py:431 +msgid "Signed serialized task package (do not edit manually)." +msgstr "Подписанный сериализованный пакет задачи (не редактировать вручную)." + +#: django_q/models.py:435 +msgid "Lock until" +msgstr "Блокировка до" + +#: django_q/models.py:436 +msgid "Prevent any cluster from pulling until" +msgstr "Не забирать задачи кластерами до" + +#: django_q/models.py:474 +msgid "Queue options" +msgstr "Дополнительные параметры очереди" + +#: django_q/models.py:478 +msgid "Queued task" +msgstr "Задача в очереди" + +#: django_q/models.py:479 +msgid "Queued tasks" +msgstr "Задачи в очереди" + +#: django_q/monitor.py:41 +#, python-format +msgid "%(name)s monitoring at %(id)s" +msgstr "%(name)s мониторинг на %(id)s" + +#: django_q/monitor.py:61 +#, python-format +msgid "Processed '%(info_name)s' (%(task_name)s)" +msgstr "Обработано «%(info_name)s» (%(task_name)s)" + +#: django_q/monitor.py:67 +#, python-format +msgid "Failed '%(info_name)s' (%(task_name)s) - %(task_result)s" +msgstr "Ошибка «%(info_name)s» (%(task_name)s) — %(task_result)s" + +#: django_q/monitor.py:74 +#, python-format +msgid "%(name)s stopped monitoring results" +msgstr "%(name)s прекратил отслеживание результатов" + +#: django_q/monitor_terminal.py:64 django_q/monitor_terminal.py:348 +msgid "Host" +msgstr "Хост" + +#: django_q/monitor_terminal.py:68 django_q/monitor_terminal.py:352 +#: django_q/monitor_terminal.py:457 +msgid "Id" +msgstr "Id" + +#: django_q/monitor_terminal.py:72 +msgid "State" +msgstr "Состояние" + +#: django_q/monitor_terminal.py:76 +msgid "Pool" +msgstr "Пул" + +#: django_q/monitor_terminal.py:80 +msgid "TQ" +msgstr "TQ" + +#: django_q/monitor_terminal.py:84 +msgid "RQ" +msgstr "RQ" + +#: django_q/monitor_terminal.py:88 +msgid "RC" +msgstr "RC" + +#: django_q/monitor_terminal.py:92 +msgid "Up" +msgstr "Аптайм" + +#: django_q/monitor_terminal.py:172 django_q/monitor_terminal.py:286 +msgid "Queued" +msgstr "В очереди" + +#: django_q/monitor_terminal.py:190 django_q/monitor_terminal.py:294 +msgid "Failures" +msgstr "Сбои" + +#: django_q/monitor_terminal.py:201 django_q/monitor_terminal.py:496 +msgid "[Press q to quit]" +msgstr "[Нажмите q для выхода]" + +#: django_q/monitor_terminal.py:227 +msgid "day" +msgstr "день" + +#: django_q/monitor_terminal.py:248 +msgid "second" +msgstr "секунда" + +#: django_q/monitor_terminal.py:251 +msgid "minute" +msgstr "минута" + +#: django_q/monitor_terminal.py:254 +msgid "hour" +msgstr "час" + +#: django_q/monitor_terminal.py:263 +#, python-format +msgid "-- %(prefix)s %(version)s on %(info)s --" +msgstr "-- %(prefix)s %(version)s на %(info)s --" + +#: django_q/monitor_terminal.py:273 +msgid "Clusters" +msgstr "Кластеры" + +#: django_q/monitor_terminal.py:277 +msgid "Workers" +msgstr "Воркеры" + +#: django_q/monitor_terminal.py:281 +msgid "Restarts" +msgstr "Перезапуски" + +#: django_q/monitor_terminal.py:290 +msgid "Successes" +msgstr "Успехи" + +#: django_q/monitor_terminal.py:299 +msgid "Schedules" +msgstr "Расписания" + +#: django_q/monitor_terminal.py:303 +#, python-format +msgid "Tasks/%(per)s" +msgstr "Задач/%(per)s" + +#: django_q/monitor_terminal.py:307 +msgid "Avg time" +msgstr "Среднее время" + +#: django_q/monitor_terminal.py:357 +msgid "Available (%)" +msgstr "Доступно (%)" + +#: django_q/monitor_terminal.py:363 +msgid "Available (MB)" +msgstr "Доступно (МБ)" + +#: django_q/monitor_terminal.py:368 +msgid "Total (MB)" +msgstr "Всего (МБ)" + +#: django_q/monitor_terminal.py:373 +msgid "Sentinel (MB)" +msgstr "Sentinel (МБ)" + +#: django_q/monitor_terminal.py:379 +msgid "Monitor (MB)" +msgstr "Монитор (МБ)" + +#: django_q/monitor_terminal.py:385 +msgid "Workers (MB)" +msgstr "Воркеры (МБ)" + +#: django_q/monitor_terminal.py:485 +#, python-format +msgid "Available lowest (): %(memory_percent)s ((at)s)" +msgstr "Минимум доступно (): %(memory_percent)s ((at)s)" + +#: django_q/monitor_terminal.py:507 +msgid "No clusters appear to be running." +msgstr "Похоже, ни один кластер не запущен." + +#: django_q/pusher.py:40 +#, python-format +msgid "%(name)s pushing tasks at %(id)s" +msgstr "%(name)s отправляет задачи на %(id)s" + +#: django_q/pusher.py:67 +#, python-format +msgid "queueing from %(list_key)s" +msgstr "очередь из %(list_key)s" + +#: django_q/pusher.py:71 +#, python-format +msgid "%(name)s stopped pushing tasks" +msgstr "%(name)s прекратил отправку задач" + +#: django_q/scheduler.py:110 +#, python-format +msgid "%(process_name)s failed to create a task from schedule [%(schedule)s]" +msgstr "" +"%(process_name)s не удалось создать задачу по расписанию [%(schedule)s]" + +#: django_q/scheduler.py:121 +#, python-format +msgid "" +"%(process_name)s created task %(task_name)s from schedule [%(schedule)s]" +msgstr "" +"%(process_name)s создал задачу %(task_name)s по расписанию [%(schedule)s]" + +#: django_q/signals.py:22 +#, python-format +msgid "malformed return hook '%(hook)s' for [%(name)s]" +msgstr "некорректный return hook «%(hook)s» для [%(name)s]" + +#: django_q/signals.py:30 +#, python-format +msgid "return hook %(hook)s failed on [%(name)s] because %(error)s" +msgstr "return hook %(hook)s для [%(name)s] завершился ошибкой: %(error)s" + +#: django_q/timeout.py:30 django_q/timeout.py:43 +msgid "SIGALARM is not available on your platform" +msgstr "SIGALRM недоступен на вашей платформе" + +#: django_q/worker.py:49 +#, python-format +msgid "%(proc_name)s ready for work at %(id)s" +msgstr "%(proc_name)s готов к работе на %(id)s" + +#: django_q/worker.py:69 +#, python-format +msgid "%(proc_name)s processing %(task_name)s '%(func_name)s'" +msgstr "%(proc_name)s выполняет %(task_name)s «%(func_name)s»" + +#: django_q/worker.py:135 +#, python-format +msgid "%(proc_name)s stopped doing work" +msgstr "%(proc_name)s прекратил работу" + +#, python-format +#~ msgid "" +#~ "Could not process '%(func_name)s'. Check the location of the function and " +#~ "the args/kwargs." +#~ msgstr "" +#~ "Не удалось обработать «%(func_name)s». Проверьте путь к функции и args/" +#~ "kwargs." diff --git a/django_q/locale/tr/LC_MESSAGES/django.po b/django_q/locale/tr/LC_MESSAGES/django.po index 1861a18..cc32a52 100644 --- a/django_q/locale/tr/LC_MESSAGES/django.po +++ b/django_q/locale/tr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-26 01:38+0000\n" +"POT-Creation-Date: 2026-04-17 21:10+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Ethem Güner \n" "Language-Team: \n" @@ -18,36 +18,44 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: admin.py:43 +#: admin.py:30 msgid "Resubmit selected tasks to queue" msgstr "Seçili işleri kuyruğa tekrar gönder" -#: admin.py:107 models.py:293 +#: admin.py:64 +msgid "Time Taken" +msgstr "" + +#: admin.py:95 +msgid "Short result" +msgstr "" + +#: admin.py:142 models.py:412 #, fuzzy #| msgid "Success" msgid "success" msgstr "başarılı olanlar" -#: admin.py:119 models.py:295 +#: admin.py:154 models.py:414 msgid "last_run" msgstr "" -#: cluster.py:79 +#: cluster.py:75 #, python-format msgid "Q Cluster %(name)s starting." msgstr "Q Cluster %(name)s başlatılıyor." -#: cluster.py:87 +#: cluster.py:83 #, python-format msgid "Q Cluster %(name)s stopping." msgstr "Q Cluster %(name)s durduruluyor." -#: cluster.py:90 +#: cluster.py:86 #, python-format msgid "Q Cluster %(name)s has stopped." msgstr "Q Cluster %(name)s durduruldu." -#: cluster.py:97 +#: cluster.py:93 #, python-format msgid "%(name)s got signal %(signal)s" msgstr "%(name)s, %(signal)s pid'inde izleniyor/monitoring yapılıyor." @@ -62,7 +70,7 @@ msgstr "Monitor %(name)s ani ölüm sonrası tekrar dirildi" msgid "reincarnated pusher %(name)s after sudden death" msgstr "Pusher %(name)s ani ölüm sonrası tekrar dirildi" -#: cluster.py:250 +#: cluster.py:262 #, fuzzy, python-format #| msgid "reincarnated worker %(name)s after timeout" msgid "" @@ -70,119 +78,55 @@ msgid "" "%(task_name)s" msgstr "Worker %(name)s zaman aşımı sonrası tekrar dirildi" -#: cluster.py:255 +#: cluster.py:265 #, python-format msgid "reincarnated worker %(name)s after timeout" msgstr "Worker %(name)s zaman aşımı sonrası tekrar dirildi" -#: cluster.py:260 +#: cluster.py:270 #, python-format msgid "recycled worker %(name)s" msgstr "Worker %(name)s geri döndürüldü" -#: cluster.py:263 +#: cluster.py:273 #, python-format msgid "reincarnated worker %(name)s after death" msgstr "Worker %(name)s ani ölüm sonrası tekrar dirildi" -#: cluster.py:287 +#: cluster.py:297 #, python-format msgid "%(name)s guarding cluster %(cluster_name)s" msgstr "%(name)s, %(cluster_name)s cluster'ını koruyor" -#: cluster.py:296 +#: cluster.py:307 #, python-format msgid "Q Cluster %(cluster_name)s running." msgstr "Q Cluster %(cluster_name)s başlatılıyor." -#: cluster.py:332 +#: cluster.py:346 #, python-format msgid "%(name)s stopping cluster processes" msgstr "Cluster %(name)s işlemleri durduruluyor." -#: cluster.py:357 +#: cluster.py:371 #, python-format msgid "%(name)s waiting for the monitor." msgstr "%(name)s monitor için bekliyor." -#: cluster.py:383 -#, fuzzy, python-format -#| msgid "%(process_name)s pushing tasks at %(id)s" -msgid "%(name)s pushing tasks at %(id)s" -msgstr "%(process_name)s, işleri %(id)s pid'ine gönderiyor." - -#: cluster.py:407 -#, python-format -msgid "queueing from %(list_key)s" -msgstr "" - -#: cluster.py:411 -#, python-format -msgid "%(name)s stopped pushing tasks" -msgstr "%(name)s işleri göndermeyi durdurdu" - -#: cluster.py:426 -#, python-format -msgid "%(name)s monitoring at %(id)s" -msgstr "%(name)s, %(id)s pid'inde izleniyor/monitoring yapılıyor." - -#: cluster.py:445 -#, python-format -msgid "Processed '%(info_name)s' (%(task_name)s)" -msgstr "[%(task_name)s] - '%(info_name)s işlendi." - -#: cluster.py:451 -#, python-format -msgid "Failed '%(info_name)s' (%(task_name)s) - %(task_result)s" -msgstr "[%(task_name)s] - '%(info_name)s' - %(task_result)s başarısız oldu" - -#: cluster.py:458 -#, python-format -msgid "%(name)s stopped monitoring results" -msgstr "%(name)s sonuçları göstermeyi bıraktı" - -#: cluster.py:474 -#, python-format -msgid "%(proc_name)s ready for work at %(id)s" -msgstr "%(proc_name)s, %(id)s pid'inde çalışmaya hazır" - -#: cluster.py:494 -#, fuzzy, python-format -#| msgid "%(proc_name)s processing '%(func_name)s' (%(task_name)s)" -msgid "%(proc_name)s processing %(task_name)s '%(func_name)s'" -msgstr "%(proc_name)s, '%(func_name)s' [%(task_name)s] işlerini işiyor" - -#: cluster.py:546 -#, python-format -msgid "%(proc_name)s stopped doing work" -msgstr "%(proc_name)s çalışmayı bıraktı" - -#: cluster.py:751 -#, python-format -msgid "%(process_name)s failed to create a task from schedule [%(schedule)s]" -msgstr "%(process_name)s programdan bir görev oluşturamadı [%(schedule)s]" - -#: cluster.py:762 -#, fuzzy, python-format -#| msgid "%(process_name)s created a task from schedule [%(schedule)s]" -msgid "" -"%(process_name)s created task %(task_name)s from schedule [%(schedule)s]" -msgstr "%(process_name)s programdan bir görev oluşturamadı [%(schedule)s]" - -#: cluster.py:808 +#: cluster.py:394 msgid "Skipping cpu affinity because psutil was not found." msgstr "Psutil bulunamadığı için cpu benzeşimi atlanıyor." -#: cluster.py:813 +#: cluster.py:399 msgid "Faking cpu affinity because it is not supported on this platform" msgstr "Bu platformda desteklenmediği için sahte cpu benzeşimi" -#: cluster.py:835 +#: cluster.py:421 #, python-format msgid "%(pid)s will use cpu %(affinity)s" msgstr "%(pid)s cpu %(affinity)s kullanacaktır" -#: conf.py:90 +#: conf.py:122 #, python-format msgid "" "SAVE_LIMIT_PER (%(option)s) is not a valid option. Options are: 'group', " @@ -192,28 +136,28 @@ msgstr "" "'group', 'name', 'func' ve None. Varsayılan değer None'dır." #. Translators: Cluster status descriptions -#: conf.py:207 +#: conf.py:239 msgid "Starting" msgstr "Başlıyor" -#: conf.py:208 +#: conf.py:240 msgid "Working" msgstr "Çalışıyor" -#: conf.py:209 +#: conf.py:241 msgid "Idle" msgstr "Boşta" -#: conf.py:210 +#: conf.py:242 msgid "Stopped" msgstr "Durdu" -#: conf.py:211 +#: conf.py:243 msgid "Stopping" msgstr "Durduruluyor" #. Translators: help text for qcluster management command -#: management/commands/qcluster.py:9 +#: management/commands/qcluster.py:11 msgid "Starts a Django Q Cluster." msgstr "Bir Django Q Cluster çalıştırır." @@ -232,257 +176,475 @@ msgstr "Q Cluster'ın bellek kullanımını izler" msgid "Monitors Q Cluster activity" msgstr "Q Cluster'ın aktivitelerini izler" -#: models.py:125 +#: models.py:30 models.py:469 +msgid "Task id" +msgstr "" + +#: models.py:31 +msgid "32-character task identifier." +msgstr "" + +#: models.py:36 models.py:235 models.py:470 +msgid "Name" +msgstr "" + +#: models.py:37 +msgid "Optional human-readable name for lookup and display." +msgstr "" + +#: models.py:41 models.py:240 models.py:468 +msgid "Function" +msgstr "" + +#: models.py:42 +msgid "Dotted import path to the callable, e.g. myapp.tasks.job." +msgstr "" + +#: models.py:47 models.py:247 +msgid "Hook" +msgstr "" + +#: models.py:48 +msgid "Optional dotted path to a callback that receives the task result." +msgstr "" + +#: models.py:53 models.py:253 models.py:472 +msgid "Arguments" +msgstr "" + +#: models.py:54 +msgid "Pickled positional arguments (tuple)." +msgstr "" + +#: models.py:59 models.py:259 models.py:473 +msgid "Keyword arguments" +msgstr "" + +#: models.py:60 +msgid "Pickled keyword arguments (dict)." +msgstr "" + +#: models.py:65 +msgid "Result" +msgstr "" + +#: models.py:66 +msgid "Pickled return value or error payload." +msgstr "" + +#: models.py:72 models.py:471 +msgid "Group" +msgstr "" + +#: models.py:73 +msgid "Optional group id to aggregate related tasks." +msgstr "" + +#: models.py:80 models.py:328 +msgid "Cluster" +msgstr "" + +#: models.py:81 +msgid "Name of the cluster that executed this task." +msgstr "" + +#: models.py:85 +msgid "Started at" +msgstr "" + +#: models.py:86 +msgid "When the worker started executing the task." +msgstr "" + +#: models.py:90 +#, fuzzy +#| msgid "Stopped" +msgid "Stopped at" +msgstr "Durdu" + +#: models.py:91 +msgid "When the worker finished (success or failure)." +msgstr "" + +#: models.py:96 monitor_terminal.py:180 +msgid "Success" +msgstr "Başarılı olanlar" + +#: models.py:97 +msgid "False if the task raised an exception or timed out." +msgstr "" + +#: models.py:101 +msgid "Attempt count" +msgstr "" + +#: models.py:102 +msgid "How many times execution was attempted." +msgstr "" + +#: models.py:172 +msgid "Task" +msgstr "" + +#: models.py:173 +msgid "Tasks" +msgstr "" + +#: models.py:194 msgid "Successful task" msgstr "Başarılı iş" -#: models.py:126 +#: models.py:195 msgid "Successful tasks" msgstr "Başarılı işler" -#: models.py:141 +#: models.py:210 msgid "Failed task" msgstr "Başarısız iş" -#: models.py:142 +#: models.py:211 msgid "Failed tasks" msgstr "Başarısız işler" -#: models.py:150 models.py:234 +#: models.py:219 models.py:347 msgid "Please install croniter to enable cron expressions" msgstr "Cron expressions'ları açmak için croniter yükleyin" -#: models.py:170 +#: models.py:236 +msgid "Optional label to identify this schedule in the admin." +msgstr "" + +#: models.py:241 +msgid "e.g. module.tasks.function" +msgstr "" + +#: models.py:248 +msgid "e.g. module.tasks.result_function" +msgstr "" + +#: models.py:254 msgid "e.g. 1, 2, 'John'" msgstr "Örneğin: 1, 2, 'Melih'" -#: models.py:172 +#: models.py:260 msgid "e.g. x=1, y=2, name='John'" msgstr "Örneğin: x=1, y=2, name='Melih'" -#: models.py:186 +#: models.py:274 msgid "Once" msgstr "Bir kere" -#: models.py:187 +#: models.py:275 models.py:296 msgid "Minutes" msgstr "Dakika" -#: models.py:188 +#: models.py:276 msgid "Hourly" msgstr "Saatlik" -#: models.py:189 +#: models.py:277 msgid "Daily" msgstr "Günlük" -#: models.py:190 +#: models.py:278 msgid "Weekly" msgstr "Haftalık" -#: models.py:191 +#: models.py:279 #, fuzzy #| msgid "Weekly" msgid "Biweekly" msgstr "İki haftada bir" -#: models.py:192 +#: models.py:280 msgid "Monthly" msgstr "Aylık" -#: models.py:193 +#: models.py:281 #, fuzzy #| msgid "Monthly" msgid "Bimonthly" msgstr "İki ayda bir" -#: models.py:194 +#: models.py:282 msgid "Quarterly" msgstr "Bir Çeyrek (3 Ay)" -#: models.py:195 +#: models.py:283 msgid "Yearly" msgstr "Yıllık" -#: models.py:196 +#: models.py:284 models.py:313 msgid "Cron" msgstr "" -#: models.py:199 +#: models.py:290 msgid "Schedule Type" msgstr "Zamanlama Tipi" -#: models.py:202 +#: models.py:291 +msgid "How often this task should be enqueued." +msgstr "" + +#: models.py:297 msgid "Number of minutes for the Minutes type" msgstr "Dakika tipine göre dakika sayısı" -#: models.py:205 +#: models.py:300 msgid "Repeats" msgstr "Tekrar eder" -#: models.py:205 +#: models.py:300 msgid "n = n times, -1 = forever" msgstr "n = n kere, -1 = sonsuza kadar" -#: models.py:208 +#: models.py:303 msgid "Next Run" msgstr "Bir dahaki çalışma tarihi" -#: models.py:215 +#: models.py:304 +msgid "When this schedule runs next (stored in UTC)." +msgstr "" + +#: models.py:314 msgid "Cron expression" msgstr "" -#: models.py:224 +#: models.py:320 +msgid "Last task id" +msgstr "" + +#: models.py:321 +msgid "Id of the last task spawned from this schedule (read-only)." +msgstr "" + +#: models.py:329 models.py:427 +msgid "Name of the target cluster" +msgstr "" + +#: models.py:336 +msgid "Intended date kwarg" +msgstr "" + +#: models.py:337 msgid "Name of kwarg to pass intended schedule date" msgstr "Geçilecek kwarg'ın adı öngörülen program tarihi" -#: models.py:299 +#: models.py:418 msgid "Scheduled task" msgstr "Zamanlanmış iş" -#: models.py:300 +#: models.py:419 msgid "Scheduled tasks" msgstr "Zamanlanmış işler" -#: models.py:326 +#: models.py:426 +msgid "Cluster key" +msgstr "" + +#: models.py:430 +msgid "Payload" +msgstr "" + +#: models.py:431 +msgid "Signed serialized task package (do not edit manually)." +msgstr "" + +#: models.py:435 +msgid "Lock until" +msgstr "" + +#: models.py:436 +msgid "Prevent any cluster from pulling until" +msgstr "" + +#: models.py:474 +#, fuzzy +#| msgid "Queued task" +msgid "Queue options" +msgstr "Sıraya alınmış iş" + +#: models.py:478 msgid "Queued task" msgstr "Sıraya alınmış iş" -#: models.py:327 +#: models.py:479 msgid "Queued tasks" msgstr "Sıraya alınmış işler" -#: monitor.py:64 monitor.py:348 +#: monitor.py:41 +#, python-format +msgid "%(name)s monitoring at %(id)s" +msgstr "%(name)s, %(id)s pid'inde izleniyor/monitoring yapılıyor." + +#: monitor.py:61 +#, python-format +msgid "Processed '%(info_name)s' (%(task_name)s)" +msgstr "[%(task_name)s] - '%(info_name)s işlendi." + +#: monitor.py:67 +#, python-format +msgid "Failed '%(info_name)s' (%(task_name)s) - %(task_result)s" +msgstr "[%(task_name)s] - '%(info_name)s' - %(task_result)s başarısız oldu" + +#: monitor.py:74 +#, python-format +msgid "%(name)s stopped monitoring results" +msgstr "%(name)s sonuçları göstermeyi bıraktı" + +#: monitor_terminal.py:64 monitor_terminal.py:348 msgid "Host" msgstr "" -#: monitor.py:68 monitor.py:352 monitor.py:459 +#: monitor_terminal.py:68 monitor_terminal.py:352 monitor_terminal.py:457 msgid "Id" msgstr "" -#: monitor.py:72 +#: monitor_terminal.py:72 msgid "State" msgstr "Durum" -#: monitor.py:76 +#: monitor_terminal.py:76 msgid "Pool" msgstr "Havuz" -#: monitor.py:80 +#: monitor_terminal.py:80 msgid "TQ" msgstr "" -#: monitor.py:84 +#: monitor_terminal.py:84 msgid "RQ" msgstr "" -#: monitor.py:88 +#: monitor_terminal.py:88 msgid "RC" msgstr "" -#: monitor.py:92 +#: monitor_terminal.py:92 msgid "Up" msgstr "" -#: monitor.py:172 monitor.py:286 +#: monitor_terminal.py:172 monitor_terminal.py:286 msgid "Queued" msgstr "Sıraya alınmış" -#: monitor.py:180 -msgid "Success" -msgstr "Başarılı olanlar" - -#: monitor.py:190 monitor.py:294 +#: monitor_terminal.py:190 monitor_terminal.py:294 msgid "Failures" msgstr "Başarısız olanlar" -#: monitor.py:201 monitor.py:498 +#: monitor_terminal.py:201 monitor_terminal.py:496 msgid "[Press q to quit]" msgstr "[Çıkmak için q'ya basın]" -#: monitor.py:227 +#: monitor_terminal.py:227 msgid "day" msgstr "gün" -#: monitor.py:248 +#: monitor_terminal.py:248 msgid "second" msgstr "saniye" -#: monitor.py:251 +#: monitor_terminal.py:251 msgid "minute" msgstr "dakika" -#: monitor.py:254 +#: monitor_terminal.py:254 msgid "hour" msgstr "saat" -#: monitor.py:263 +#: monitor_terminal.py:263 #, python-format msgid "-- %(prefix)s %(version)s on %(info)s --" msgstr "-- %(prefix)s %(version)s üzerinde %(info)s --" -#: monitor.py:273 +#: monitor_terminal.py:273 msgid "Clusters" msgstr "" -#: monitor.py:277 +#: monitor_terminal.py:277 msgid "Workers" msgstr "" -#: monitor.py:281 +#: monitor_terminal.py:281 msgid "Restarts" msgstr "Yeniden çalıştırmalar" -#: monitor.py:290 +#: monitor_terminal.py:290 msgid "Successes" msgstr "Başarılı olanlar" -#: monitor.py:299 +#: monitor_terminal.py:299 msgid "Schedules" msgstr "Zamanlanmışlar" -#: monitor.py:303 +#: monitor_terminal.py:303 #, python-format msgid "Tasks/%(per)s" msgstr "İş/%(per)s" -#: monitor.py:307 +#: monitor_terminal.py:307 msgid "Avg time" msgstr "Ortalama süre" -#: monitor.py:357 +#: monitor_terminal.py:357 msgid "Available (%)" msgstr "Müsait (%) " -#: monitor.py:363 +#: monitor_terminal.py:363 msgid "Available (MB)" msgstr "Müsait (MB)" -#: monitor.py:368 +#: monitor_terminal.py:368 msgid "Total (MB)" msgstr "Toplam (MB)" -#: monitor.py:373 +#: monitor_terminal.py:373 msgid "Sentinel (MB)" msgstr "" -#: monitor.py:379 +#: monitor_terminal.py:379 msgid "Monitor (MB)" msgstr "İzleme (MB)" -#: monitor.py:385 +#: monitor_terminal.py:385 msgid "Workers (MB)" msgstr "" -#: monitor.py:487 +#: monitor_terminal.py:485 #, python-format msgid "Available lowest (): %(memory_percent)s ((at)s)" msgstr "Mevcut en düşük (): %(memory_percent)s ((at)s)" -#: monitor.py:509 +#: monitor_terminal.py:507 msgid "No clusters appear to be running." msgstr "Hiçbir küme çalışıyor görünmüyor." +#: pusher.py:40 +#, python-format +msgid "%(name)s pushing tasks at %(id)s" +msgstr "%(name)s, işleri %(id)s pid'ine gönderiyor." + +#: pusher.py:67 +#, python-format +msgid "queueing from %(list_key)s" +msgstr "%(list_key)s kuyruğa alınıyor" + +#: pusher.py:71 +#, python-format +msgid "%(name)s stopped pushing tasks" +msgstr "%(name)s işleri göndermeyi durdurdu" + +#: scheduler.py:110 +#, python-format +msgid "%(process_name)s failed to create a task from schedule [%(schedule)s]" +msgstr "%(process_name)s programdan bir görev oluşturamadı [%(schedule)s]" + +#: scheduler.py:121 +#, python-format +msgid "" +"%(process_name)s created task %(task_name)s from schedule [%(schedule)s]" +msgstr "%(process_name)s programdan %(task_name)s görevini oluşturdu [%(schedule)s]" + #: signals.py:22 #, python-format msgid "malformed return hook '%(hook)s' for [%(name)s]" @@ -493,6 +655,26 @@ msgstr "" msgid "return hook %(hook)s failed on [%(name)s] because %(error)s" msgstr "" +#: timeout.py:30 timeout.py:43 +msgid "SIGALARM is not available on your platform" +msgstr "" + +#: worker.py:49 +#, python-format +msgid "%(proc_name)s ready for work at %(id)s" +msgstr "%(proc_name)s, %(id)s pid'inde çalışmaya hazır" + +#: worker.py:69 +#, fuzzy, python-format +#| msgid "%(proc_name)s processing '%(func_name)s' (%(task_name)s)" +msgid "%(proc_name)s processing %(task_name)s '%(func_name)s'" +msgstr "%(proc_name)s, '%(func_name)s' [%(task_name)s] işlerini işiyor" + +#: worker.py:135 +#, python-format +msgid "%(proc_name)s stopped doing work" +msgstr "%(proc_name)s çalışmayı bıraktı" + #, python-format #~ msgid "" #~ "Could not process '%(func_name)s'. Check the location of the function and " diff --git a/django_q/locale/zh_Hans/LC_MESSAGES/django.po b/django_q/locale/zh_Hans/LC_MESSAGES/django.po index 87056e6..a9794cc 100644 --- a/django_q/locale/zh_Hans/LC_MESSAGES/django.po +++ b/django_q/locale/zh_Hans/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: django-q\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-14 16:36+0800\n" +"POT-Creation-Date: 2026-04-17 21:10+0000\n" "PO-Revision-Date: 2026-01-14 16:36+0800\n" "Last-Translator: Yibo Li \n" "Language-Team: Simplified Chinese\n" @@ -17,37 +17,45 @@ msgstr "" "X-Generator: \n" "Plural-Forms: nplurals=1; plural=0;\n" -#: admin.py:43 +#: admin.py:30 msgid "Resubmit selected tasks to queue" msgstr "将选定的任务重新提交到队列" -#: admin.py:107 models.py:293 +#: admin.py:64 +msgid "Time Taken" +msgstr "" + +#: admin.py:95 +msgid "Short result" +msgstr "" + +#: admin.py:142 models.py:412 #, fuzzy #| msgid "Success" msgid "success" msgstr "成功" -#: admin.py:119 models.py:295 +#: admin.py:154 models.py:414 msgid "last_run" msgstr "最后运行" -#: cluster.py:79 +#: cluster.py:75 #, python-format msgid "Q Cluster %(name)s starting." msgstr "Q 集群 %(name)s 正在启动。" -#: cluster.py:87 +#: cluster.py:83 #, fuzzy, python-format #| msgid "Q Cluster-{} stopping." msgid "Q Cluster %(name)s stopping." msgstr "Q 集群 %(name)s 正在停止。" -#: cluster.py:90 +#: cluster.py:86 #, python-format msgid "Q Cluster %(name)s has stopped." msgstr "Q 集群 %(name)s 已停止。" -#: cluster.py:97 +#: cluster.py:93 #, python-format msgid "%(name)s got signal %(signal)s" msgstr "%(name)s 收到信号 %(signal)s" @@ -62,7 +70,7 @@ msgstr "意外宕机后monitor %(name)s 已重生" msgid "reincarnated pusher %(name)s after sudden death" msgstr "意外宕机后pusher %(name)s 已重生" -#: cluster.py:250 +#: cluster.py:262 #, fuzzy, python-format #| msgid "reincarnated worker %(name)s after timeout" msgid "" @@ -70,152 +78,86 @@ msgid "" "%(task_name)s" msgstr "处理任务 %(task_name)s 时超时,worker %(name)s 已重生" -#: cluster.py:255 +#: cluster.py:265 #, python-format msgid "reincarnated worker %(name)s after timeout" msgstr "超时后worker %(name)s 已重生" -#: cluster.py:260 +#: cluster.py:270 #, python-format msgid "recycled worker %(name)s" msgstr "worker %(name)s 已回收" -#: cluster.py:263 +#: cluster.py:273 #, python-format msgid "reincarnated worker %(name)s after death" msgstr "意外宕机后worker %(name)s 已重生" -#: cluster.py:287 +#: cluster.py:297 #, python-format msgid "%(name)s guarding cluster %(cluster_name)s" msgstr "%(name)s 正在保护Cluster %(cluster_name)s" -#: cluster.py:296 +#: cluster.py:307 #, python-format msgid "Q Cluster %(cluster_name)s running." msgstr "Q 集群 %(cluster_name)s 正在运行。" -#: cluster.py:332 +#: cluster.py:346 #, python-format msgid "%(name)s stopping cluster processes" msgstr "%(name)s 正在停止集群进程" -#: cluster.py:357 +#: cluster.py:371 #, python-format msgid "%(name)s waiting for the monitor." msgstr "%(name)s 正在等待监视器。" -#: cluster.py:383 -#, fuzzy, python-format -#| msgid "%(process_name)s pushing tasks at %(id)s" -msgid "%(name)s pushing tasks at %(id)s" -msgstr "%(name)s 正在 %(id)s 处推送任务" - -#: cluster.py:407 -#, python-format -msgid "queueing from %(list_key)s" -msgstr "从 %(list_key)s 排队" - -#: cluster.py:411 -#, python-format -msgid "%(name)s stopped pushing tasks" -msgstr "%(name)s 已停止推送任务" - -#: cluster.py:426 -#, python-format -msgid "%(name)s monitoring at %(id)s" -msgstr "%(name)s 正在 %(id)s 处监视" - -#: cluster.py:445 -#, python-format -msgid "Processed '%(info_name)s' (%(task_name)s)" -msgstr "已处理 '%(info_name)s' (%(task_name)s)" - -#: cluster.py:451 -#, python-format -msgid "Failed '%(info_name)s' (%(task_name)s) - %(task_result)s" -msgstr "'%(info_name)s' (%(task_name)s) 失败 - %(task_result)s" - -#: cluster.py:458 -#, python-format -msgid "%(name)s stopped monitoring results" -msgstr "%(name)s 已停止监视结果" - -#: cluster.py:474 -#, python-format -msgid "%(proc_name)s ready for work at %(id)s" -msgstr "%(proc_name)s 已准备好在 %(id)s 处工作" - -#: cluster.py:494 -#, fuzzy, python-format -#| msgid "%(proc_name)s processing '%(func_name)s' (%(task_name)s)" -msgid "%(proc_name)s processing %(task_name)s '%(func_name)s'" -msgstr "%(proc_name)s 正在处理任务 %(task_name)s '%(func_name)s'" - -#: cluster.py:546 -#, python-format -msgid "%(proc_name)s stopped doing work" -msgstr "%(proc_name)s 已停止工作" - -#: cluster.py:751 -#, python-format -msgid "%(process_name)s failed to create a task from schedule [%(schedule)s]" -msgstr "" -"%(process_name)s 无法从计划 [%(schedule)s] 创建任务" - -#: cluster.py:762 -#, fuzzy, python-format -#| msgid "%(process_name)s created a task from schedule [%(schedule)s]" -msgid "" -"%(process_name)s created task %(task_name)s from schedule [%(schedule)s]" -msgstr "" -"%(process_name)s 从计划 [%(schedule)s] 创建了任务 %(task_name)s" - -#: cluster.py:808 +#: cluster.py:394 msgid "Skipping cpu affinity because psutil was not found." msgstr "跳过 CPU 亲和性,因为未找到 psutil。" -#: cluster.py:813 +#: cluster.py:399 msgid "Faking cpu affinity because it is not supported on this platform" -msgstr "" -"伪造 CPU 亲和性,因为此平台不支持此功能" +msgstr "伪造 CPU 亲和性,因为此平台不支持此功能" -#: cluster.py:835 +#: cluster.py:421 #, python-format msgid "%(pid)s will use cpu %(affinity)s" msgstr "%(pid)s 将使用 CPU %(affinity)s" -#: conf.py:90 +#: conf.py:122 #, python-format msgid "" "SAVE_LIMIT_PER (%(option)s) is not a valid option. Options are: 'group', " "'name', 'func' and None. Default is None." msgstr "" -"SAVE_LIMIT_PER (%(option)s) 不是有效的选项。选项包括:'group'、'name'、'func' 和 None。默认值是 None。" +"SAVE_LIMIT_PER (%(option)s) 不是有效的选项。选项包" +"括:'group'、'name'、'func' 和 None。默认值是 None。" #. Translators: Cluster status descriptions -#: conf.py:207 +#: conf.py:239 msgid "Starting" msgstr "正在启动" -#: conf.py:208 +#: conf.py:240 msgid "Working" msgstr "工作中" -#: conf.py:209 +#: conf.py:241 msgid "Idle" msgstr "空闲" -#: conf.py:210 +#: conf.py:242 msgid "Stopped" msgstr "已停止" -#: conf.py:211 +#: conf.py:243 msgid "Stopping" msgstr "正在停止" #. Translators: help text for qcluster management command -#: management/commands/qcluster.py:9 +#: management/commands/qcluster.py:11 msgid "Starts a Django Q Cluster." msgstr "启动 Django Q 集群。" @@ -234,253 +176,475 @@ msgstr "监视 Q 集群内存使用情况" msgid "Monitors Q Cluster activity" msgstr "监视 Q 集群活动" -#: models.py:125 -msgid "Successful task" -msgstr "成功的任务" +#: models.py:30 models.py:469 +msgid "Task id" +msgstr "" -#: models.py:126 -msgid "Successful tasks" -msgstr "成功的任务" +#: models.py:31 +msgid "32-character task identifier." +msgstr "" -#: models.py:141 -msgid "Failed task" -msgstr "失败的任务" +#: models.py:36 models.py:235 models.py:470 +msgid "Name" +msgstr "" -#: models.py:142 -msgid "Failed tasks" -msgstr "失败的任务" +#: models.py:37 +msgid "Optional human-readable name for lookup and display." +msgstr "" -#: models.py:150 models.py:234 -msgid "Please install croniter to enable cron expressions" -msgstr "请安装 croniter 以启用 cron 表达式" +#: models.py:41 models.py:240 models.py:468 +msgid "Function" +msgstr "" -#: models.py:170 -msgid "e.g. 1, 2, 'John'" -msgstr "例如 1, 2, 'John'" +#: models.py:42 +msgid "Dotted import path to the callable, e.g. myapp.tasks.job." +msgstr "" -#: models.py:172 -msgid "e.g. x=1, y=2, name='John'" -msgstr "例如 x=1, y=2, name='John'" +#: models.py:47 models.py:247 +msgid "Hook" +msgstr "" -#: models.py:186 -msgid "Once" -msgstr "一次" +#: models.py:48 +msgid "Optional dotted path to a callback that receives the task result." +msgstr "" -#: models.py:187 -msgid "Minutes" -msgstr "分钟" +#: models.py:53 models.py:253 models.py:472 +msgid "Arguments" +msgstr "" -#: models.py:188 -msgid "Hourly" -msgstr "每小时" +#: models.py:54 +msgid "Pickled positional arguments (tuple)." +msgstr "" -#: models.py:189 -msgid "Daily" -msgstr "每天" +#: models.py:59 models.py:259 models.py:473 +msgid "Keyword arguments" +msgstr "" -#: models.py:190 -msgid "Weekly" -msgstr "每周" +#: models.py:60 +msgid "Pickled keyword arguments (dict)." +msgstr "" -#: models.py:191 -msgid "Biweekly" -msgstr "每两周" +#: models.py:65 +msgid "Result" +msgstr "" -#: models.py:192 -msgid "Monthly" -msgstr "每月" +#: models.py:66 +msgid "Pickled return value or error payload." +msgstr "" -#: models.py:193 -msgid "Bimonthly" -msgstr "每两个月" +#: models.py:72 models.py:471 +msgid "Group" +msgstr "" -#: models.py:194 -msgid "Quarterly" -msgstr "每季度" +#: models.py:73 +msgid "Optional group id to aggregate related tasks." +msgstr "" -#: models.py:195 -msgid "Yearly" -msgstr "每年" +#: models.py:80 models.py:328 +#, fuzzy +#| msgid "Clusters" +msgid "Cluster" +msgstr "集群" -#: models.py:196 -msgid "Cron" -msgstr "Cron" +#: models.py:81 +msgid "Name of the cluster that executed this task." +msgstr "" -#: models.py:199 -msgid "Schedule Type" -msgstr "计划类型" +#: models.py:85 +msgid "Started at" +msgstr "" -#: models.py:202 -msgid "Number of minutes for the Minutes type" -msgstr "'分钟'类型的分钟数" +#: models.py:86 +msgid "When the worker started executing the task." +msgstr "" -#: models.py:205 -msgid "Repeats" -msgstr "重复次数" +#: models.py:90 +#, fuzzy +#| msgid "Stopped" +msgid "Stopped at" +msgstr "已停止" -#: models.py:205 -msgid "n = n times, -1 = forever" -msgstr "n = n 次,-1 = 永远" +#: models.py:91 +msgid "When the worker finished (success or failure)." +msgstr "" -#: models.py:208 -msgid "Next Run" -msgstr "下次运行" - -#: models.py:215 -msgid "Cron expression" -msgstr "Cron 表达式" - -#: models.py:224 -msgid "Name of kwarg to pass intended schedule date" -msgstr "传递预定计划日期的 kwarg 的名称" - -#: models.py:299 -msgid "Scheduled task" -msgstr "计划任务" - -#: models.py:300 -msgid "Scheduled tasks" -msgstr "计划任务" - -#: models.py:326 -msgid "Queued task" -msgstr "排队的任务" - -#: models.py:327 -msgid "Queued tasks" -msgstr "排队的任务" - -#: monitor.py:64 monitor.py:348 -msgid "Host" -msgstr "主机" - -#: monitor.py:68 monitor.py:352 monitor.py:459 -msgid "Id" -msgstr "ID" - -#: monitor.py:72 -msgid "State" -msgstr "状态" - -#: monitor.py:76 -msgid "Pool" -msgstr "连接池" - -#: monitor.py:80 -msgid "TQ" -msgstr "TQ" - -#: monitor.py:84 -msgid "RQ" -msgstr "RQ" - -#: monitor.py:88 -msgid "RC" -msgstr "RC" - -#: monitor.py:92 -msgid "Up" -msgstr "运行中" - -#: monitor.py:172 monitor.py:286 -msgid "Queued" -msgstr "已排队" - -#: monitor.py:180 +#: models.py:96 monitor_terminal.py:180 msgid "Success" msgstr "成功" -#: monitor.py:190 monitor.py:294 +#: models.py:97 +msgid "False if the task raised an exception or timed out." +msgstr "" + +#: models.py:101 +msgid "Attempt count" +msgstr "" + +#: models.py:102 +msgid "How many times execution was attempted." +msgstr "" + +#: models.py:172 +msgid "Task" +msgstr "" + +#: models.py:173 +msgid "Tasks" +msgstr "" + +#: models.py:194 +msgid "Successful task" +msgstr "成功的任务" + +#: models.py:195 +msgid "Successful tasks" +msgstr "成功的任务" + +#: models.py:210 +msgid "Failed task" +msgstr "失败的任务" + +#: models.py:211 +msgid "Failed tasks" +msgstr "失败的任务" + +#: models.py:219 models.py:347 +msgid "Please install croniter to enable cron expressions" +msgstr "请安装 croniter 以启用 cron 表达式" + +#: models.py:236 +msgid "Optional label to identify this schedule in the admin." +msgstr "" + +#: models.py:241 +msgid "e.g. module.tasks.function" +msgstr "" + +#: models.py:248 +msgid "e.g. module.tasks.result_function" +msgstr "" + +#: models.py:254 +msgid "e.g. 1, 2, 'John'" +msgstr "例如 1, 2, 'John'" + +#: models.py:260 +msgid "e.g. x=1, y=2, name='John'" +msgstr "例如 x=1, y=2, name='John'" + +#: models.py:274 +msgid "Once" +msgstr "一次" + +#: models.py:275 models.py:296 +msgid "Minutes" +msgstr "分钟" + +#: models.py:276 +msgid "Hourly" +msgstr "每小时" + +#: models.py:277 +msgid "Daily" +msgstr "每天" + +#: models.py:278 +msgid "Weekly" +msgstr "每周" + +#: models.py:279 +msgid "Biweekly" +msgstr "每两周" + +#: models.py:280 +msgid "Monthly" +msgstr "每月" + +#: models.py:281 +msgid "Bimonthly" +msgstr "每两个月" + +#: models.py:282 +msgid "Quarterly" +msgstr "每季度" + +#: models.py:283 +msgid "Yearly" +msgstr "每年" + +#: models.py:284 models.py:313 +msgid "Cron" +msgstr "Cron" + +#: models.py:290 +msgid "Schedule Type" +msgstr "计划类型" + +#: models.py:291 +msgid "How often this task should be enqueued." +msgstr "" + +#: models.py:297 +msgid "Number of minutes for the Minutes type" +msgstr "'分钟'类型的分钟数" + +#: models.py:300 +msgid "Repeats" +msgstr "重复次数" + +#: models.py:300 +msgid "n = n times, -1 = forever" +msgstr "n = n 次,-1 = 永远" + +#: models.py:303 +msgid "Next Run" +msgstr "下次运行" + +#: models.py:304 +msgid "When this schedule runs next (stored in UTC)." +msgstr "" + +#: models.py:314 +msgid "Cron expression" +msgstr "Cron 表达式" + +#: models.py:320 +msgid "Last task id" +msgstr "" + +#: models.py:321 +msgid "Id of the last task spawned from this schedule (read-only)." +msgstr "" + +#: models.py:329 models.py:427 +msgid "Name of the target cluster" +msgstr "" + +#: models.py:336 +msgid "Intended date kwarg" +msgstr "" + +#: models.py:337 +msgid "Name of kwarg to pass intended schedule date" +msgstr "传递预定计划日期的 kwarg 的名称" + +#: models.py:418 +msgid "Scheduled task" +msgstr "计划任务" + +#: models.py:419 +msgid "Scheduled tasks" +msgstr "计划任务" + +#: models.py:426 +#, fuzzy +#| msgid "Clusters" +msgid "Cluster key" +msgstr "集群" + +#: models.py:430 +msgid "Payload" +msgstr "" + +#: models.py:431 +msgid "Signed serialized task package (do not edit manually)." +msgstr "" + +#: models.py:435 +msgid "Lock until" +msgstr "" + +#: models.py:436 +msgid "Prevent any cluster from pulling until" +msgstr "" + +#: models.py:474 +#, fuzzy +#| msgid "Queued task" +msgid "Queue options" +msgstr "排队的任务" + +#: models.py:478 +msgid "Queued task" +msgstr "排队的任务" + +#: models.py:479 +msgid "Queued tasks" +msgstr "排队的任务" + +#: monitor.py:41 +#, python-format +msgid "%(name)s monitoring at %(id)s" +msgstr "%(name)s 正在 %(id)s 处监视" + +#: monitor.py:61 +#, python-format +msgid "Processed '%(info_name)s' (%(task_name)s)" +msgstr "已处理 '%(info_name)s' (%(task_name)s)" + +#: monitor.py:67 +#, python-format +msgid "Failed '%(info_name)s' (%(task_name)s) - %(task_result)s" +msgstr "'%(info_name)s' (%(task_name)s) 失败 - %(task_result)s" + +#: monitor.py:74 +#, python-format +msgid "%(name)s stopped monitoring results" +msgstr "%(name)s 已停止监视结果" + +#: monitor_terminal.py:64 monitor_terminal.py:348 +msgid "Host" +msgstr "主机" + +#: monitor_terminal.py:68 monitor_terminal.py:352 monitor_terminal.py:457 +msgid "Id" +msgstr "ID" + +#: monitor_terminal.py:72 +msgid "State" +msgstr "状态" + +#: monitor_terminal.py:76 +msgid "Pool" +msgstr "连接池" + +#: monitor_terminal.py:80 +msgid "TQ" +msgstr "TQ" + +#: monitor_terminal.py:84 +msgid "RQ" +msgstr "RQ" + +#: monitor_terminal.py:88 +msgid "RC" +msgstr "RC" + +#: monitor_terminal.py:92 +msgid "Up" +msgstr "运行中" + +#: monitor_terminal.py:172 monitor_terminal.py:286 +msgid "Queued" +msgstr "已排队" + +#: monitor_terminal.py:190 monitor_terminal.py:294 msgid "Failures" msgstr "失败" -#: monitor.py:201 monitor.py:498 +#: monitor_terminal.py:201 monitor_terminal.py:496 msgid "[Press q to quit]" msgstr "[按 q 键退出]" -#: monitor.py:227 +#: monitor_terminal.py:227 msgid "day" msgstr "天" -#: monitor.py:248 +#: monitor_terminal.py:248 msgid "second" msgstr "秒" -#: monitor.py:251 +#: monitor_terminal.py:251 msgid "minute" msgstr "分钟" -#: monitor.py:254 +#: monitor_terminal.py:254 msgid "hour" msgstr "小时" -#: monitor.py:263 +#: monitor_terminal.py:263 #, python-format msgid "-- %(prefix)s %(version)s on %(info)s --" msgstr "-- %(prefix)s %(version)s 在 %(info)s 上 --" -#: monitor.py:273 +#: monitor_terminal.py:273 msgid "Clusters" msgstr "集群" -#: monitor.py:277 +#: monitor_terminal.py:277 msgid "Workers" msgstr "工作进程" -#: monitor.py:281 +#: monitor_terminal.py:281 msgid "Restarts" msgstr "重启次数" -#: monitor.py:290 +#: monitor_terminal.py:290 msgid "Successes" msgstr "成功次数" -#: monitor.py:299 +#: monitor_terminal.py:299 msgid "Schedules" msgstr "计划" -#: monitor.py:303 +#: monitor_terminal.py:303 #, python-format msgid "Tasks/%(per)s" msgstr "任务/%(per)s" -#: monitor.py:307 +#: monitor_terminal.py:307 msgid "Avg time" msgstr "平均时间" -#: monitor.py:357 +#: monitor_terminal.py:357 msgid "Available (%)" msgstr "可用 (%)" -#: monitor.py:363 +#: monitor_terminal.py:363 msgid "Available (MB)" msgstr "可用 (MB)" -#: monitor.py:368 +#: monitor_terminal.py:368 msgid "Total (MB)" msgstr "总计 (MB)" -#: monitor.py:373 +#: monitor_terminal.py:373 msgid "Sentinel (MB)" msgstr "哨兵 (MB)" -#: monitor.py:379 +#: monitor_terminal.py:379 msgid "Monitor (MB)" msgstr "监视器 (MB)" -#: monitor.py:385 +#: monitor_terminal.py:385 msgid "Workers (MB)" msgstr "工作进程 (MB)" -#: monitor.py:487 +#: monitor_terminal.py:485 #, python-format msgid "Available lowest (): %(memory_percent)s ((at)s)" msgstr "最低可用 (): %(memory_percent)s ((at)s)" -#: monitor.py:509 +#: monitor_terminal.py:507 msgid "No clusters appear to be running." msgstr "似乎没有集群正在运行。" +#: pusher.py:40 +#, python-format +msgid "%(name)s pushing tasks at %(id)s" +msgstr "%(name)s 正在 %(id)s 处推送任务" + +#: pusher.py:67 +#, python-format +msgid "queueing from %(list_key)s" +msgstr "从 %(list_key)s 排队" + +#: pusher.py:71 +#, python-format +msgid "%(name)s stopped pushing tasks" +msgstr "%(name)s 已停止推送任务" + +#: scheduler.py:110 +#, python-format +msgid "%(process_name)s failed to create a task from schedule [%(schedule)s]" +msgstr "%(process_name)s 无法从计划 [%(schedule)s] 创建任务" + +#: scheduler.py:121 +#, python-format +msgid "" +"%(process_name)s created task %(task_name)s from schedule [%(schedule)s]" +msgstr "%(process_name)s 从计划 [%(schedule)s] 创建了任务 %(task_name)s" + #: signals.py:22 #, python-format msgid "malformed return hook '%(hook)s' for [%(name)s]" @@ -491,9 +655,28 @@ msgstr "格式错误的返回钩子 '%(hook)s' 用于 [%(name)s]" msgid "return hook %(hook)s failed on [%(name)s] because %(error)s" msgstr "返回钩子 %(hook)s 在 [%(name)s] 上失败,原因是 %(error)s" +#: timeout.py:30 timeout.py:43 +msgid "SIGALARM is not available on your platform" +msgstr "" + +#: worker.py:49 +#, python-format +msgid "%(proc_name)s ready for work at %(id)s" +msgstr "%(proc_name)s 已准备好在 %(id)s 处工作" + +#: worker.py:69 +#, fuzzy, python-format +#| msgid "%(proc_name)s processing '%(func_name)s' (%(task_name)s)" +msgid "%(proc_name)s processing %(task_name)s '%(func_name)s'" +msgstr "%(proc_name)s 正在处理任务 %(task_name)s '%(func_name)s'" + +#: worker.py:135 +#, python-format +msgid "%(proc_name)s stopped doing work" +msgstr "%(proc_name)s 已停止工作" + #, python-format #~ msgid "" #~ "Could not process '%(func_name)s'. Check the location of the function and " #~ "the args/kwargs." -#~ msgstr "" -#~ "无法处理函数 '%(func_name)s'。检查函数的位置和args/kwargs。" +#~ msgstr "无法处理函数 '%(func_name)s'。检查函数的位置和args/kwargs。" diff --git a/django_q/migrations/0019_alter_task_options_alter_ormq_key_alter_ormq_lock_and_more.py b/django_q/migrations/0019_alter_task_options_alter_ormq_key_alter_ormq_lock_and_more.py new file mode 100644 index 0000000..88d762c --- /dev/null +++ b/django_q/migrations/0019_alter_task_options_alter_ormq_key_alter_ormq_lock_and_more.py @@ -0,0 +1,325 @@ +# Generated by Django 6.0.4 on 2026-04-17 20:55 + +import django.utils.timezone +import picklefield.fields +from django.db import migrations, models + +import django_q.models + + +class Migration(migrations.Migration): + dependencies = [ + ("django_q", "0018_task_success_index"), + ] + + operations = [ + migrations.AlterModelOptions( + name="task", + options={ + "ordering": ["-stopped"], + "verbose_name": "Task", + "verbose_name_plural": "Tasks", + }, + ), + migrations.AlterField( + model_name="ormq", + name="key", + field=models.CharField( + help_text="Name of the target cluster", + max_length=100, + verbose_name="Cluster key", + ), + ), + migrations.AlterField( + model_name="ormq", + name="lock", + field=models.DateTimeField( + help_text="Prevent any cluster from pulling until", + null=True, + verbose_name="Lock until", + ), + ), + migrations.AlterField( + model_name="ormq", + name="payload", + field=models.TextField( + help_text="Signed serialized task package (do not edit manually).", + verbose_name="Payload", + ), + ), + migrations.AlterField( + model_name="schedule", + name="args", + field=models.TextField( + blank=True, + help_text="e.g. 1, 2, 'John'", + null=True, + verbose_name="Arguments", + ), + ), + migrations.AlterField( + model_name="schedule", + name="cluster", + field=models.CharField( + blank=True, + default=None, + help_text="Name of the target cluster", + max_length=100, + null=True, + verbose_name="Cluster", + ), + ), + migrations.AlterField( + model_name="schedule", + name="cron", + field=models.CharField( + blank=True, + help_text="Cron expression", + max_length=100, + null=True, + validators=[django_q.models.validate_cron], + verbose_name="Cron", + ), + ), + migrations.AlterField( + model_name="schedule", + name="func", + field=models.CharField( + help_text="e.g. module.tasks.function", + max_length=256, + verbose_name="Function", + ), + ), + migrations.AlterField( + model_name="schedule", + name="hook", + field=models.CharField( + blank=True, + help_text="e.g. module.tasks.result_function", + max_length=256, + null=True, + verbose_name="Hook", + ), + ), + migrations.AlterField( + model_name="schedule", + name="intended_date_kwarg", + field=models.CharField( + blank=True, + help_text="Name of kwarg to pass intended schedule date", + max_length=100, + null=True, + validators=[django_q.models.validate_kwarg], + verbose_name="Intended date kwarg", + ), + ), + migrations.AlterField( + model_name="schedule", + name="kwargs", + field=models.TextField( + blank=True, + help_text="e.g. x=1, y=2, name='John'", + null=True, + verbose_name="Keyword arguments", + ), + ), + migrations.AlterField( + model_name="schedule", + name="minutes", + field=models.PositiveSmallIntegerField( + blank=True, + help_text="Number of minutes for the Minutes type", + null=True, + verbose_name="Minutes", + ), + ), + migrations.AlterField( + model_name="schedule", + name="name", + field=models.CharField( + blank=True, + help_text="Optional label to identify this schedule in the admin.", + max_length=100, + null=True, + verbose_name="Name", + ), + ), + migrations.AlterField( + model_name="schedule", + name="next_run", + field=models.DateTimeField( + default=django.utils.timezone.now, + help_text="When this schedule runs next (stored in UTC).", + null=True, + verbose_name="Next Run", + ), + ), + migrations.AlterField( + model_name="schedule", + name="schedule_type", + field=models.CharField( + choices=[ + ("O", "Once"), + ("I", "Minutes"), + ("H", "Hourly"), + ("D", "Daily"), + ("W", "Weekly"), + ("BW", "Biweekly"), + ("M", "Monthly"), + ("BM", "Bimonthly"), + ("Q", "Quarterly"), + ("Y", "Yearly"), + ("C", "Cron"), + ], + default="O", + help_text="How often this task should be enqueued.", + max_length=2, + verbose_name="Schedule Type", + ), + ), + migrations.AlterField( + model_name="schedule", + name="task", + field=models.CharField( + editable=False, + help_text="Id of the last task spawned from this schedule (read-only).", + max_length=100, + null=True, + verbose_name="Last task id", + ), + ), + migrations.AlterField( + model_name="task", + name="args", + field=picklefield.fields.PickledObjectField( + editable=False, + help_text="Pickled positional arguments (tuple).", + null=True, + protocol=-1, + verbose_name="Arguments", + ), + ), + migrations.AlterField( + model_name="task", + name="attempt_count", + field=models.IntegerField( + default=0, + help_text="How many times execution was attempted.", + verbose_name="Attempt count", + ), + ), + migrations.AlterField( + model_name="task", + name="cluster", + field=models.CharField( + blank=True, + default=None, + help_text="Name of the cluster that executed this task.", + max_length=100, + null=True, + verbose_name="Cluster", + ), + ), + migrations.AlterField( + model_name="task", + name="func", + field=models.CharField( + help_text="Dotted import path to the callable, e.g. myapp.tasks.job.", + max_length=256, + verbose_name="Function", + ), + ), + migrations.AlterField( + model_name="task", + name="group", + field=models.CharField( + editable=False, + help_text="Optional group id to aggregate related tasks.", + max_length=100, + null=True, + verbose_name="Group", + ), + ), + migrations.AlterField( + model_name="task", + name="hook", + field=models.CharField( + help_text="Optional dotted path to a callback that receives the task result.", + max_length=256, + null=True, + verbose_name="Hook", + ), + ), + migrations.AlterField( + model_name="task", + name="id", + field=models.CharField( + editable=False, + help_text="32-character task identifier.", + max_length=32, + primary_key=True, + serialize=False, + verbose_name="Task id", + ), + ), + migrations.AlterField( + model_name="task", + name="kwargs", + field=picklefield.fields.PickledObjectField( + editable=False, + help_text="Pickled keyword arguments (dict).", + null=True, + protocol=-1, + verbose_name="Keyword arguments", + ), + ), + migrations.AlterField( + model_name="task", + name="name", + field=models.CharField( + editable=False, + help_text="Optional human-readable name for lookup and display.", + max_length=100, + verbose_name="Name", + ), + ), + migrations.AlterField( + model_name="task", + name="result", + field=picklefield.fields.PickledObjectField( + editable=False, + help_text="Pickled return value or error payload.", + null=True, + protocol=-1, + verbose_name="Result", + ), + ), + migrations.AlterField( + model_name="task", + name="started", + field=models.DateTimeField( + editable=False, + help_text="When the worker started executing the task.", + verbose_name="Started at", + ), + ), + migrations.AlterField( + model_name="task", + name="stopped", + field=models.DateTimeField( + editable=False, + help_text="When the worker finished (success or failure).", + verbose_name="Stopped at", + ), + ), + migrations.AlterField( + model_name="task", + name="success", + field=models.BooleanField( + default=True, + editable=False, + help_text="False if the task raised an exception or timed out.", + verbose_name="Success", + ), + ), + ] diff --git a/django_q/models.py b/django_q/models.py index 0ff46b4..befdf4d 100644 --- a/django_q/models.py +++ b/django_q/models.py @@ -5,7 +5,6 @@ from keyword import iskeyword from django.core.exceptions import ValidationError from django.db import models from django.db.models import Q -from django.template.defaultfilters import truncatechars from django.urls import reverse from django.utils import timezone from django.utils.functional import cached_property @@ -24,19 +23,86 @@ from .utils import get_func_repr class Task(models.Model): - id = models.CharField(max_length=32, primary_key=True, editable=False) - name = models.CharField(max_length=100, editable=False) - func = models.CharField(max_length=256) - hook = models.CharField(max_length=256, null=True) - args = PickledObjectField(null=True, protocol=-1) - kwargs = PickledObjectField(null=True, protocol=-1) - result = PickledObjectField(null=True, protocol=-1) - group = models.CharField(max_length=100, editable=False, null=True) - cluster = models.CharField(max_length=100, default=None, null=True, blank=True) - started = models.DateTimeField(editable=False) - stopped = models.DateTimeField(editable=False) - success = models.BooleanField(default=True, editable=False) - attempt_count = models.IntegerField(default=0) + id = models.CharField( + max_length=32, + primary_key=True, + editable=False, + verbose_name=_("Task id"), + help_text=_("32-character task identifier."), + ) + name = models.CharField( + max_length=100, + editable=False, + verbose_name=_("Name"), + help_text=_("Optional human-readable name for lookup and display."), + ) + func = models.CharField( + max_length=256, + verbose_name=_("Function"), + help_text=_("Dotted import path to the callable, e.g. myapp.tasks.job."), + ) + hook = models.CharField( + max_length=256, + null=True, + verbose_name=_("Hook"), + help_text=_( + "Optional dotted path to a callback that receives the task result." + ), + ) + args = PickledObjectField( + null=True, + protocol=-1, + verbose_name=_("Arguments"), + help_text=_("Pickled positional arguments (tuple)."), + ) + kwargs = PickledObjectField( + null=True, + protocol=-1, + verbose_name=_("Keyword arguments"), + help_text=_("Pickled keyword arguments (dict)."), + ) + result = PickledObjectField( + null=True, + protocol=-1, + verbose_name=_("Result"), + help_text=_("Pickled return value or error payload."), + ) + group = models.CharField( + max_length=100, + editable=False, + null=True, + verbose_name=_("Group"), + help_text=_("Optional group id to aggregate related tasks."), + ) + cluster = models.CharField( + max_length=100, + default=None, + null=True, + blank=True, + verbose_name=_("Cluster"), + help_text=_("Name of the cluster that executed this task."), + ) + started = models.DateTimeField( + editable=False, + verbose_name=_("Started at"), + help_text=_("When the worker started executing the task."), + ) + stopped = models.DateTimeField( + editable=False, + verbose_name=_("Stopped at"), + help_text=_("When the worker finished (success or failure)."), + ) + success = models.BooleanField( + default=True, + editable=False, + verbose_name=_("Success"), + help_text=_("False if the task raised an exception or timed out."), + ) + attempt_count = models.IntegerField( + default=0, + verbose_name=_("Attempt count"), + help_text=_("How many times execution was attempted."), + ) @staticmethod def get_result(task_id): @@ -100,15 +166,13 @@ class Task(models.Model): def time_taken(self): return (self.stopped - self.started).total_seconds() - @property - def short_result(self): - return truncatechars(self.result, 100) - def __str__(self): return f"{self.name or self.id}" class Meta: app_label = "django_q" + verbose_name = _("Task") + verbose_name_plural = _("Tasks") ordering = ["-stopped"] indexes = [ models.Index( @@ -166,17 +230,36 @@ def validate_kwarg(value): class Schedule(models.Model): - name = models.CharField(max_length=100, null=True, blank=True) - func = models.CharField(max_length=256, help_text="e.g. module.tasks.function") + name = models.CharField( + max_length=100, + null=True, + blank=True, + verbose_name=_("Name"), + help_text=_("Optional label to identify this schedule in the admin."), + ) + func = models.CharField( + max_length=256, + verbose_name=_("Function"), + help_text=_("e.g. module.tasks.function"), + ) hook = models.CharField( max_length=256, null=True, blank=True, - help_text="e.g. module.tasks.result_function", + verbose_name=_("Hook"), + help_text=_("e.g. module.tasks.result_function"), + ) + args = models.TextField( + null=True, + blank=True, + verbose_name=_("Arguments"), + help_text=_("e.g. 1, 2, 'John'"), ) - args = models.TextField(null=True, blank=True, help_text=_("e.g. 1, 2, 'John'")) kwargs = models.TextField( - null=True, blank=True, help_text=_("e.g. x=1, y=2, name='John'") + null=True, + blank=True, + verbose_name=_("Keyword arguments"), + help_text=_("e.g. x=1, y=2, name='John'"), ) ONCE = "O" MINUTES = "I" @@ -203,30 +286,48 @@ class Schedule(models.Model): (CRON, _("Cron")), ) schedule_type = models.CharField( - max_length=2, choices=TYPE, default=TYPE[0][0], verbose_name=_("Schedule Type") + max_length=2, + choices=TYPE, + default=TYPE[0][0], + verbose_name=_("Schedule Type"), + help_text=_("How often this task should be enqueued."), ) minutes = models.PositiveSmallIntegerField( - null=True, blank=True, help_text=_("Number of minutes for the Minutes type") + null=True, + blank=True, + verbose_name=_("Minutes"), + help_text=_("Number of minutes for the Minutes type"), ) repeats = models.IntegerField( default=-1, verbose_name=_("Repeats"), help_text=_("n = n times, -1 = forever") ) next_run = models.DateTimeField( - verbose_name=_("Next Run"), default=timezone.now, null=True + verbose_name=_("Next Run"), + help_text=_("When this schedule runs next (stored in UTC)."), + default=timezone.now, + null=True, ) cron = models.CharField( max_length=100, null=True, blank=True, validators=[validate_cron], + verbose_name=_("Cron"), help_text=_("Cron expression"), ) - task = models.CharField(max_length=100, null=True, editable=False) + task = models.CharField( + max_length=100, + null=True, + editable=False, + verbose_name=_("Last task id"), + help_text=_("Id of the last task spawned from this schedule (read-only)."), + ) cluster = models.CharField( max_length=100, default=None, null=True, blank=True, + verbose_name=_("Cluster"), help_text=_("Name of the target cluster"), ) intended_date_kwarg = models.CharField( @@ -234,6 +335,7 @@ class Schedule(models.Model): null=True, blank=True, validators=[validate_kwarg], + verbose_name=_("Intended date kwarg"), help_text=_("Name of kwarg to pass intended schedule date"), ) @@ -321,10 +423,19 @@ class Schedule(models.Model): class OrmQ(models.Model): - key = models.CharField(max_length=100, help_text=_("Name of the target cluster")) - payload = models.TextField() + key = models.CharField( + max_length=100, + verbose_name=_("Cluster key"), + help_text=_("Name of the target cluster"), + ) + payload = models.TextField( + verbose_name=_("Payload"), + help_text=_("Signed serialized task package (do not edit manually)."), + ) lock = models.DateTimeField( - null=True, help_text=_("Prevent any cluster from pulling until") + null=True, + verbose_name=_("Lock until"), + help_text=_("Prevent any cluster from pulling until"), ) @cached_property @@ -356,6 +467,14 @@ class OrmQ(models.Model): exclude = {"id", "name", "group", "func", "args", "kwargs"} return {k: v for k, v in self.task.items() if k not in exclude} + func.short_description = _("Function") + task_id.short_description = _("Task id") + name.short_description = _("Name") + group.short_description = _("Group") + args.short_description = _("Arguments") + kwargs.short_description = _("Keyword arguments") + q_options.short_description = _("Queue options") + class Meta: app_label = "django_q" verbose_name = _("Queued task") diff --git a/django_q/monitor.py b/django_q/monitor.py index 4e87c14..11eff70 100644 --- a/django_q/monitor.py +++ b/django_q/monitor.py @@ -161,7 +161,7 @@ def save_task(task, broker: Broker): def save_cached(task, broker: Broker): - task_key = f'{broker.list_key}:{task["id"]}' + task_key = f"{broker.list_key}:{task['id']}" timeout = task["cached"] if timeout is True: timeout = None diff --git a/django_q/utils.py b/django_q/utils.py index 3068b76..c7a4678 100644 --- a/django_q/utils.py +++ b/django_q/utils.py @@ -50,9 +50,7 @@ def get_func_repr(func): if inspect.isfunction(func): return f"{func.__module__}.{func.__name__}" elif inspect.ismethod(func) and hasattr(func.__self__, "__name__"): - return ( - f"{func.__self__.__module__}." f"{func.__self__.__name__}.{func.__name__}" - ) + return f"{func.__self__.__module__}.{func.__self__.__name__}.{func.__name__}" else: return str(func) if func else None