mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			701 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			701 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # Generated by Django 3.1.3 on 2020-11-25 14:53
 | |
| 
 | |
| from django.db import migrations
 | |
| from django.db.migrations import RunPython
 | |
| from django_q.models import Schedule
 | |
| from django_q.tasks import schedule
 | |
| 
 | |
| 
 | |
| def add_schedules(apps, schema_editor):
 | |
|     schedule('documents.tasks.sanity_check', name="Perform sanity check", schedule_type=Schedule.WEEKLY)
 | |
| 
 | |
| 
 | |
| def remove_schedules(apps, schema_editor):
 | |
|     Schedule.objects.filter(func='documents.tasks.sanity_check').delete()
 | |
| 
 | |
| 
 | |
| class Migration(migrations.Migration):
 | |
| 
 | |
|     dependencies = [
 | |
|         ('documents', '1003_mime_types'),
 | |
|         ('django_q', '0013_task_attempt_count'),
 | |
|     ]
 | |
| 
 | |
|     operations = [
 | |
|         RunPython(add_schedules, remove_schedules)
 | |
|     ]
 | 
