Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues/50:: create function decorator #83

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

issues/50:: create function decorator #83

wants to merge 2 commits into from

Conversation

komuw
Copy link
Owner

@komuw komuw commented Jul 25, 2019

Thank you for contributing to wiji.
Every contribution to wiji is important.

Contributor offers to license certain software (a “Contribution” or multiple
“Contributions”) to wiji, and wiji agrees to accept said Contributions,
under the terms of the MIT License.
Contributor understands and agrees that wiji shall have the irrevocable and perpetual right to make
and distribute copies of any Contribution, as well as to create and distribute collective works and
derivative works of any Contribution, under the MIT License.

Now,

What(What have you changed?)

Why(Why did you change it?)

References:

@codecov-io
Copy link

Codecov Report

Merging #83 into master will decrease coverage by 0.92%.
The diff coverage is 15.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #83      +/-   ##
==========================================
- Coverage   79.11%   78.18%   -0.93%     
==========================================
  Files          14       14              
  Lines         881      894      +13     
==========================================
+ Hits          697      699       +2     
- Misses        184      195      +11
Impacted Files Coverage Δ
wiji/app.py 78.94% <ø> (ø) ⬆️
wiji/task.py 73.19% <15.38%> (-2.71%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80a3aaf...29fdfb1. Read the comment docs.

async def hello():
print("hello world.")

await hello().delay()
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is weird.

@task_decor(the_broker=InMemoryBroker(), queue_name="q1")
async def hello():
    print("hello world.")
    await hello().delay()

await hello().delay()

calling a function like; hello().delay() instead of hello.delay().

this may lead to a lot of confusion/questions and weird error messages.
the func decorator may not be worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create function decorator
2 participants