1 3
from django.core.management.base import BaseCommand
2 3
from django.core.management import call_command
3 3
from crum import impersonate
4 3
from django.contrib.auth import get_user_model
5 3
from cyborgbackup.main import consumers
6

7

8 3
class Command(BaseCommand):
9
    """Create preloaded data, intended for new installs
10
    """
11 3
    help = 'Creates a preload tower data iff there is none.'
12

13 3
    def handle(self, *args, **kwargs):
14 0
        consumers.emit_channel_notification("jobs-status_changed", {
15
            "job_id": 38631,
16
            "status": "successful",
17
            "job_name": "Backup Job Backup mail from Knet",
18
            "group_name": "jobs"
19
	}) 
20 0
        consumers.emit_channel_notification("jobs-status_changed", {
21
            "job_id": 38631,
22
            "status": "failed",
23
            "job_name": "Backup Job Backup mail from Knet",
24
            "group_name": "jobs"
25
	}) 
26 0
        consumers.emit_channel_notification("jobs-status_changed", {
27
            "job_id": 38631,
28
            "status": "running",
29
            "job_name": "Backup Job Backup mail from Knet",
30
            "group_name": "jobs"
31
	}) 

Read our documentation on viewing source code .

Loading