#NEWLINE# @ periodic_task ( run_every = crontab ( minute = 1 , hour = '*/6' ) , queue = getattr ( settings , 'CELERY_PERIODIC_QUEUE' , 'celery' ) ) #NEWLINE# def new_update_case_properties( ) : #NEWLINE# #INDENT# '\n    Submit one case-block per case update deliberately instead of bulk update so that\n    any single case update can be undone\n    ' #NEWLINE# for ( case , domain ) in iter_cases_to_modify ( ) : #NEWLINE# #INDENT# kwargs = { #NEWLINE# #INDENT# 'create' : False , #NEWLINE# 'case_id' : case [ 'case_id' ] , #NEWLINE# 'update' : case [ 'update' ] , #NEWLINE# 'close' : case [ 'close' ] , #NEWLINE# #UNINDENT# } #NEWLINE# if case . get ( 'owner_id' , None ) : #NEWLINE# #INDENT# kwargs [ 'owner_id' ] = case [ 'owner_id' ] #NEWLINE# #UNINDENT# submit_case_blocks ( [ ElementTree . tostring ( CaseBlock ( ** kwargs ) . as_xml ( ) ) ] , domain )