MCPcopy Create free account

hub / github.com/python-arq/arq / functions

Functions305 in github.com/python-arq/arq

↓ 112 callersMethodenqueue_job
Enqueue a job. :param function: Name of the function to call :param args: args to pass to the function :param _job_i
arq/connections.py:119
↓ 84 callersFunctionworker
(arq_redis)
tests/conftest.py:94
↓ 69 callersMethodmain
(self)
arq/worker.py:349
↓ 57 callersFunctionfunc
Wrapper for a job function which lets you configure more settings. :param coroutine: coroutine function to call, can be a string to import
arq/worker.py:61
↓ 27 callersMethodresult
Get the result of the job or, if the job raised an exception, reraise it. This function waits for the result if it's not yet availab
arq/jobs.py:85
↓ 26 callersMethodinfo
All information on a job, including its result if it's available, does not wait for the result.
arq/jobs.py:127
↓ 19 callersFunctioncreate_pool
Create a new redis pool, retrying up to ``conn_retries`` times if the connection fails. Returns a :class:`arq.connections.ArqRedis` instance
arq/connections.py:220
↓ 17 callersFunctiontimestamp_ms
()
arq/utils.py:29
↓ 15 callersMethodclose
(self)
arq/worker.py:868
↓ 15 callersMethodrun_check
Run :func:`arq.worker.Worker.async_run`, check for failed jobs and raise :class:`arq.worker.FailedJobs` if any jobs have failed.
arq/worker.py:327
↓ 15 callersMethodset
(self, name, value)
tests/conftest.py:169
↓ 14 callersFunctioncron
Create a cron job, eg. it should be executed at specific times. Workers will enqueue this job at or just after the set times. If ``unique``
arq/cron.py:128
↓ 11 callersMethodrun
Sync function to run the worker, finally closes worker connections.
arq/worker.py:307
↓ 10 callersMethod_poll_iteration
Get ids of pending jobs from the main queue sorted-set data structure and start those jobs, remove any finished tasks from self.tasks
arq/worker.py:377
↓ 9 callersMethodstatus
Status of the job.
arq/jobs.py:152
↓ 8 callersFunctionserialize_result
( function: str, args: tuple[Any, ...], kwargs: dict[str, Any], job_try: int, enqueue_time
arq/jobs.py:229
↓ 8 callersFunctionto_seconds
(td: None)
arq/utils.py:84
↓ 7 callersMethodabort
Abort the job. :param timeout: maximum time to wait for the job result before raising ``TimeoutError``, will wait foreve
arq/jobs.py:171
↓ 6 callersFunctionto_ms
(td: None)
arq/utils.py:66
↓ 5 callersFunctionms_to_datetime
convert milliseconds to datetime, use the timezone in os.environ
arq/utils.py:54
↓ 5 callersFunctionnext_cron
Find the next datetime matching the given parameters.
arq/cron.py:22
↓ 4 callersMethod_add_signal_handler
(self, signum: Signals, handler: Callable[[Signals], None])
arq/worker.py:794
↓ 4 callersFunctionimport_string
Taken from pydantic.utils.
arq/utils.py:138
↓ 4 callersMethodresult_info
Information about the job result if available, does not wait for the result. Does not raise an exception even if the job raised one.
arq/jobs.py:141
↓ 4 callersMethodstart_jobs
For each job id, get the job definition, check it's not running and start it in a task
arq/worker.py:436
↓ 3 callersFunctionas_int
(f: float)
arq/utils.py:25
↓ 3 callersFunctionasync_check_health
( redis_settings: Optional[RedisSettings], health_check_key: Optional[str] = None, queue_name: Optional[st
arq/worker.py:903
↓ 3 callersMethodasync_run
Asynchronously run the worker, does not close connections. Useful when testing.
arq/worker.py:320
↓ 3 callersFunctiondeserialize_job_raw
( r: bytes, *, deserializer: Optional[Deserializer] = None )
arq/jobs.py:292
↓ 3 callersMethodhandle_sig
(self, signum: Signals)
arq/worker.py:852
↓ 3 callersFunctionwait_and_abort
(job, delay=0.1)
tests/test_worker.py:861
↓ 2 callersMethod_get_job_result
(self, key: bytes)
arq/connections.py:183
↓ 2 callersMethod_jobs_started
(self)
arq/worker.py:800
↓ 2 callersMethodall_job_results
Get results for all jobs in redis.
arq/connections.py:192
↓ 2 callersMethodcalculate_next
(self, prev_run: datetime)
arq/cron.py:112
↓ 2 callersFunctioncheck_health
Run a health check on the worker and return the appropriate exit code. :return: 0 if successful, 1 if not
arq/worker.py:922
↓ 2 callersFunctioncreate_worker
(settings_cls: 'WorkerSettingsType', **kwargs: Any)
arq/worker.py:893
↓ 2 callersFunctiondeserialize_job
(r: bytes, *, deserializer: Optional[Deserializer] = None)
arq/jobs.py:274
↓ 2 callersFunctiondeserialize_result
(r: bytes, *, deserializer: Optional[Deserializer] = None)
arq/jobs.py:304
↓ 2 callersMethodfinish_failed_job
(self, job_id: str, result_data: Optional[bytes])
arq/worker.py:713
↓ 2 callersMethodfrom_dsn
(cls, dsn: str)
arq/connections.py:57
↓ 2 callersFunctionget_kwargs
(settings_cls: 'WorkerSettingsType')
arq/worker.py:887
↓ 2 callersFunctionlog_redis_info
(redis: 'Redis[bytes]', log_func: Callable[[str], Any])
arq/connections.py:302
↓ 2 callersFunctionpoll
(step: float = 0.5)
arq/utils.py:101
↓ 2 callersFunctionrun_worker
(settings_cls: 'WorkerSettingsType', **kwargs: Any)
arq/worker.py:897
↓ 2 callersFunctiontest_enqueue_job
(arq_redis: ArqRedis, worker, queue_name=default_queue_name)
tests/test_jobs.py:66
↓ 2 callersFunctionto_unix_ms
convert a datetime to epoch with milliseconds as int
arq/utils.py:33
↓ 2 callersFunctiontruncate
Truncate a string and add an ellipsis (three dots) to the end if it was too long :param s: string to possibly truncate :param length: le
arq/utils.py:115
↓ 1 callersMethod_cancel_aborted_jobs
Go through job_ids in the abort_jobs_ss sorted set and cancel those tasks.
arq/worker.py:408
↓ 1 callersMethod_get_job_def
(self, job_id: bytes, score: int)
arq/connections.py:200
↓ 1 callersFunction_get_next_dt
(dt_: datetime, options: Options)
arq/cron.py:51
↓ 1 callersMethod_release_sem_dec_counter_on_complete
(self)
arq/worker.py:432
↓ 1 callersMethod_sleep_until_tasks_complete
Sleeps until all tasks are done. Used together with asyncio.wait_for()
arq/worker.py:803
↓ 1 callersMethod_wait_for_tasks_to_complete
Wait for tasks to complete, until `wait_for_job_completion_on_signal_second` has been reached.
arq/worker.py:810
↓ 1 callersFunctionargs_to_string
(args: Sequence[Any], kwargs: dict[str, Any])
arq/utils.py:127
↓ 1 callersFunctioncancel_remaining_task
()
tests/conftest.py:148
↓ 1 callersMethodclear
(self)
tests/conftest.py:173
↓ 1 callersFunctioncli
Job queues in python with asyncio and redis. CLI to run the arq worker.
arq/cli.py:33
↓ 1 callersFunctiondefault_log_config
Setup default config. for dictConfig. :param verbose: level: DEBUG if True, INFO if False :return: dict suitable for ``logging.config.di
arq/logs.py:4
↓ 1 callersMethodfinish_job
( self, job_id: str, finish: bool, result_data: Optional[bytes], resul
arq/worker.py:682
↓ 1 callersFunctionget_tz
()
arq/utils.py:41
↓ 1 callersMethodhandle_sig_wait_for_completion
Alternative signal handler that allow tasks to complete within a given time before shutting down the worker. Time can be configured u
arq/worker.py:833
↓ 1 callersMethodheart_beat
(self)
arq/worker.py:729
↓ 1 callersFunctionmain
()
docs/examples/main_demo.py:22
↓ 1 callersFunctionmain
()
docs/examples/job_abort.py:12
↓ 1 callersFunctionmain
()
docs/examples/retry.py:22
↓ 1 callersFunctionmain
()
docs/examples/deferred.py:10
↓ 1 callersFunctionmain
()
docs/examples/slow_job.py:9
↓ 1 callersFunctionmain
()
docs/examples/custom_serialization_msgpack.py:13
↓ 1 callersFunctionmain
()
docs/examples/job_ids.py:11
↓ 1 callersFunctionmain
()
docs/examples/job_results.py:12
↓ 1 callersFunctionmock_awatch
()
tests/test_cli.py:45
↓ 1 callersFunctionpool_factory
(*args: Any, **kwargs: Any)
arq/connections.py:241
↓ 1 callersMethodqueued_jobs
Get information about queued, mostly useful when testing.
arq/connections.py:210
↓ 1 callersMethodrecord_health
(self)
arq/worker.py:773
↓ 1 callersMethodrun_cron
(self, n: datetime, delay: float, num_windows: int = 2)
arq/worker.py:736
↓ 1 callersMethodrun_job
(self, job_id: str, score: int)
arq/worker.py:478
↓ 1 callersFunctionserialize_job
( function_name: str, args: tuple[Any, ...], kwargs: dict[str, Any], job_try: Optional[int],
arq/jobs.py:211
↓ 1 callersFunctionwatch_reload
(path: str, worker_settings: 'WorkerSettingsType')
arq/cli.py:57
↓ 1 callersFunctionworker_retry
(arq_redis_retry)
tests/conftest.py:111
Method__call__
(self, ctx: dict[Any, Any], *args: Any, **kwargs: Any)
arq/typing.py:29
Method__call__
(self, ctx: dict[Any, Any])
arq/typing.py:36
Method__eq__
(self, other: Any)
arq/worker.py:115
Method__getstate__
(self)
tests/test_jobs.py:129
Method__getstate__
(self)
tests/test_main.py:222
Method__init__
( self, pool_or_conn: Optional[ConnectionPool] = None, job_serializer: Optional[Serial
arq/connections.py:102
Method__init__
( self, job_id: str, redis: 'Redis[bytes]', _queue_name: str = default_queue_n
arq/jobs.py:73
Method__init__
(self, defer: Optional['SecondsTimedelta'] = None)
arq/worker.py:104
Method__init__
(self, count: int, job_results: list[JobResult])
arq/worker.py:122
Method__init__
( self, functions: Sequence[Union[Function, 'WorkerCoroutine']] = (), *, queue
arq/worker.py:187
Method__init__
(self, v)
tests/test_worker.py:715
Method__init__
(self)
tests/conftest.py:166
Method__post_init__
(self)
arq/jobs.py:52
Method__repr__
(self)
arq/cron.py:124
Method__repr__
(self)
arq/connections.py:79
Method__repr__
(self)
arq/jobs.py:199
Method__repr__
(self)
arq/worker.py:107
Method__repr__
(self)
arq/worker.py:133
Method__repr__
(self)
arq/worker.py:880
Method__setstate__
(self, state)
tests/test_worker.py:718
next →1–100 of 305, ranked by callers