from celery import Celery

from allsky import single_image_raspistill

celery = Celery('tasks', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0')

@celery.task
def background_task():
    # some long running task here (this simple example has no output)
    pid = single_image_raspistill(filename='static/snap.jpg')

from celery import Celery

from allsky import single_image_raspistill

celery = Celery('tasks', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0')

@celery.task
def background_task():
    # some long running task here (this simple example has no output)
    pid = single_image_raspistill(filename='static/snap.jpg', exp=120000000)

Set a higher default for darks
Set a higher default for darks

  from celery import Celery
  
  from allsky import single_image_raspistill
  
  celery = Celery('tasks', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0')
  
  @celery.task
  def background_task():
      # some long running task here (this simple example has no output)
-     pid = single_image_raspistill(filename='static/snap.jpg')
+     pid = single_image_raspistill(filename='static/snap.jpg', exp=120000000)
  
Set a higher default for darks
## Code Before:
from celery import Celery

from allsky import single_image_raspistill

celery = Celery('tasks', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0')

@celery.task
def background_task():
    # some long running task here (this simple example has no output)
    pid = single_image_raspistill(filename='static/snap.jpg')

## Instruction:
Set a higher default for darks
## Code After:
from celery import Celery

from allsky import single_image_raspistill

celery = Celery('tasks', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0')

@celery.task
def background_task():
    # some long running task here (this simple example has no output)
    pid = single_image_raspistill(filename='static/snap.jpg', exp=120000000)
