def update_main_cell_ndfi(z, x, y):
    r = Report.current()
    cell = Cell.get_or_create(r, x, y, z)
    deferred.defer(ndfi_value_for_cells,
                   str(cell.key()),
                   _queue="ndfichangevalue")
    return 'working'
def update_cells_ndfi():
    r = Report.current()
    cell = Cell.get_or_default(r, 0, 0, 0)
    for c in iter(cell.children()):
        c.put()
        deferred.defer(ndfi_value_for_cells, str(c.key()), _queue="ndfichangevalue")
    return 'working'
def update_cells_ndfi():
    r = Report.current()
    cell = Cell.get_or_default(r, 0, 0, 0)
    for c in iter(cell.children()):
        c.put()
        deferred.defer(ndfi_value_for_cells,
                       str(c.key()),
                       _queue="ndfichangevalue")
    return 'working'
def update_cells_ndfi_dummy():
    r = Report.current()
    if not r:
        return 'create a report first'
    cell = Cell.get_or_default(r, 0, 0, 0)
    for c in iter(cell.children()):
        c.put()
        deferred.defer(ndfi_value_for_cells_dummy, str(c.key()), _queue="ndfichangevalue")
    return 'working DUMMY'
def update_cells_ndfi_dummy():
    r = Report.current()
    if not r:
        return 'create a report first'
    cell = Cell.get_or_default(r, 0, 0, 0)
    for c in iter(cell.children()):
        c.put()
        deferred.defer(ndfi_value_for_cells_dummy,
                       str(c.key()),
                       _queue="ndfichangevalue")
    return 'working DUMMY'
def update_main_cell_ndfi(z, x, y):
    r = Report.current()
    cell = Cell.get_or_create(r, x, y, z)
    deferred.defer(ndfi_value_for_cells, str(cell.key()), _queue="ndfichangevalue")
    return 'working'