Skip to main content

z4j scheduler adapter for Huey @periodic_task (Apache 2.0)

Project description

z4j-hueyperiodic

PyPI version Python License

The Huey @periodic_task scheduler adapter for z4j.

Surfaces every @periodic_task decorator your Huey app registers on the dashboard's Schedules page, read, enable, disable, trigger.

Compatibility

  • Huey 2.4+ and <4
  • Python 3.10+

Full per-adapter matrix at https://z4j.dev/reference/compatibility/.

What it ships

Capability Notes
List schedules every @periodic_task-decorated function in the registry
Read by registered name
Enable / disable via consumer-side gating
Trigger now enqueues the task immediately, outside the schedule
Boot inventory full snapshot at agent connect; existing schedules show up without editing

@periodic_task schedules are defined in code (decorator argument), so create / update / delete are intentionally out of scope, those need a deploy round-trip. The dashboard hides buttons it can't honor.

Install

pip install z4j-huey z4j-hueyperiodic
from huey import RedisHuey
from z4j_bare import install_agent
from z4j_huey import HueyEngineAdapter
from z4j_hueyperiodic import HueyPeriodicAdapter

huey = RedisHuey("myapp", url="redis://localhost")

@huey.periodic_task(crontab(minute="*/5"))
def cleanup():
    ...

install_agent(
    engines=[HueyEngineAdapter(huey=huey)],
    schedulers=[HueyPeriodicAdapter(huey=huey)],
    brain_url="https://brain.example.com",
    token="z4j_agent_...",
    project_id="my-project",
)

Pairs with

Reliability

  • No exception from the adapter ever propagates back into Huey consumers or your task code.
  • The decorator's runtime behavior is unchanged, z4j observes through Huey's standard hooks.

Documentation

Full docs at z4j.dev/schedulers/huey-periodic/.

License

Apache-2.0, see LICENSE.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

z4j_hueyperiodic-1.6.7.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

z4j_hueyperiodic-1.6.7-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file z4j_hueyperiodic-1.6.7.tar.gz.

File metadata

  • Download URL: z4j_hueyperiodic-1.6.7.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for z4j_hueyperiodic-1.6.7.tar.gz
Algorithm Hash digest
SHA256 5acd322c8e2f2f3aef58b700136cd1e242bcfdc6e345f82ba01a8c7ecd561a3f
MD5 220fcc6597e4b23076c8b0ca211f56a9
BLAKE2b-256 1d8c06b8375b408e40f40c2c8378e54733839234b27d03970c1f66b9558d46f8

See more details on using hashes here.

File details

Details for the file z4j_hueyperiodic-1.6.7-py3-none-any.whl.

File metadata

File hashes

Hashes for z4j_hueyperiodic-1.6.7-py3-none-any.whl
Algorithm Hash digest
SHA256 49acd6b1e834ed12d8c59c34ade3fcf17d3ef7679c4d932eb614f7d4bbba27fc
MD5 35a92033f9083b884fd432181c8ecf85
BLAKE2b-256 05aa7b14baeb634ab4e90f428f9403499edd9e1fcddc5332534a6c9d3ebaf269

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page