• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

arteria / django-background-tasks / 247 / 11
76%
master: 76%

Build:
DEFAULT BRANCH: master
Ran 04 Aug 2017 01:56PM UTC
Files 15
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Aug 2017 01:45PM UTC coverage: 76.65% (-0.2%) from 76.857%
TOX_ENV=py34-django110-sync

push

travis-ci

walterrenner
Initialize ThreadPools only if/when needed. (#110)

Calling ThreadPool will spawn the requested number of Threads
immediately. As `tasks` is imported when the `@background` decorator is
used a new ThreadPool will be created for every Django worker if a
`@background` task is defined. Altough those threads are idle they are
using still ressources.

This commit introduces a PoolRunner which does create a single static
ThreadPool only if/when a async task is requested to run.
The downside of this approach is the additional work needed for creating
the Pool when starting the first task. But as tasks should be run from
the managment command this shouldn't be a problem.

453 of 591 relevant lines covered (76.65%)

0.77 hits per line

Source Files on job 247.11 (TOX_ENV=py34-django110-sync)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 247
  • Travis Job 247.11
  • fb2bf67e on github
  • Prev Job for TOX_ENV=py34-django110-sync on master (#246.11)
  • Next Job for TOX_ENV=py34-django110-sync on master (#248.11)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc