tobymao / saq

Simple Async Queues
https://saq-py.readthedocs.io/en/latest/
MIT License
577 stars 39 forks source link

Fix cronjob inability to pass kwargs to the function #141

Closed Seemone closed 2 months ago

Seemone commented 2 months ago

Fix a bug where cronjob creation could not accept a kwargs parameter as described in the documentation

tobymao commented 2 months ago

@Seemone thanks, can you add a test?

barakalon commented 2 months ago

Where in the documentation does it say CronJobs accept kwargs?

Seemone commented 2 months ago

@barakalon function documentation https://github.com/tobymao/saq/blob/d5be27cc4c9c123bed85ced97aad50ea4f519aed/saq/job.py#L54

tobymao commented 2 months ago

it says here

    **The remaining kwargs are pass through to Job:** (see equivalent field in Job for more)

    * timeout
    * heartbeat
    * retries
    * ttl

not arbitrary kwargs

Seemone commented 2 months ago

@tobymao tests amended

you're right, I misread the comment.

consider this a feature addition then