closeio / closeio/tasktiger

Example for batch is not giving expected results

Open
#101 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
95
Avg merge
4d 21h
Merged PRs (30d)
1

Description

I have created a test function to test receiving batch tasks:

@tiger.task(batch=True, queue="test_queue")
def test_task(kwargs):
    print("-------")
    print(kwargs)
    print("--------")

For tiger configuration I have same for both sender and task definition:

tiger = tasktiger.TaskTiger(connection=conn, config={
    'BATCH_QUEUES': {
        'test_queue': 50
    },
})

When executing PYTHONPATH=. tasktiger it prints tasks one-by-one instead of 1 array with the list of args and kwargs.

Also it will be needed to add PYTHONPATH to the supervisor configuration also, which is not mentioned in "Documentation".

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the batch=True task example and the BATCH_QUEUES configuration, then run the reported PYTHONPATH=. tasktiger command to compare the observed output with the expected single batch of arguments and keyword arguments. Done means batch tasks produce the expected grouped result and the supervisor documentation mentions the required PYTHONPATH setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.