a wrapper around the task queue
This commit is contained in:
@@ -2,6 +2,8 @@ import math
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import colorsys
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
lbstoN = 4.44822
|
||||
|
||||
@@ -100,7 +102,7 @@ def range_to_color_hex(groupcols,palette='monochrome_blue'):
|
||||
|
||||
try:
|
||||
plt = palettes[palette]
|
||||
except KeyErro:
|
||||
except KeyError:
|
||||
plt = palettes['monochrome_blue']
|
||||
|
||||
rgb = [colorsys.hsv_to_rgb((plt[0]+plt[1]*x)/360.,
|
||||
@@ -214,3 +216,12 @@ def isbreakthrough(delta,cpvalues,p0,p1,p2,p3,ratio):
|
||||
|
||||
|
||||
return res>1,btdf,res2>1
|
||||
|
||||
|
||||
def myqueue(queue,function,*args,**kwargs):
|
||||
if settings.DEBUG:
|
||||
job = function.delay(*args,**kwargs)
|
||||
else:
|
||||
job = queue.enqueue(function,*args,**kwargs)
|
||||
|
||||
return job
|
||||
|
||||
Reference in New Issue
Block a user